[PATCH 6/7] qemuBuildMemoryBackendProps: use 'rc' instead of ret.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do not overwrite the 'ret' value more than once.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/qemu/qemu_command.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 262f4d0594..528e11d5a0 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3331,7 +3331,7 @@ qemuBuildMemoryBackendProps(virJSONValuePtr *backendProps,
     VIR_AUTOFREE(char *) memPath = NULL;
     bool prealloc = false;
     virBitmapPtr nodemask = NULL;
-    int ret = -1;
+    int rc;
     VIR_AUTOPTR(virJSONValue) props = NULL;
     bool nodeSpecified = virDomainNumatuneNodeSpecified(def->numa, mem->targetNode);
     unsigned long long pagesize = mem->pagesize;
@@ -3545,7 +3545,7 @@ qemuBuildMemoryBackendProps(virJSONValuePtr *backendProps,
         !force) {
         /* report back that using the new backend is not necessary
          * to achieve the desired configuration */
-        ret = 1;
+        rc = 1;
     } else {
         /* otherwise check the required capability */
         if (STREQ(backendType, "memory-backend-file") &&
@@ -3568,14 +3568,14 @@ qemuBuildMemoryBackendProps(virJSONValuePtr *backendProps,
             return -1;
         }
 
-        ret = 0;
+        rc = 0;
     }
 
     if (!(*backendProps = qemuMonitorCreateObjectPropsWrap(backendType, alias,
                                                            &props)))
-        ret = -1;
+        return -1;
 
-    return ret;
+    return rc;
 }
 
 
-- 
2.19.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux