]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuBuildMemoryBackendProps: use 'rc' instead of ret.
authorJán Tomko <jtomko@redhat.com>
Mon, 26 Aug 2019 20:37:41 +0000 (22:37 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 18 Sep 2019 09:33:18 +0000 (11:33 +0200)
Do not overwrite the 'ret' value more than once.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
src/qemu/qemu_command.c

index c5ef79653ba11c07b49e89086f9419461e88b6d1..df499f75e3d68e28bd0998bd895ed002933eee8b 100644 (file)
@@ -3333,7 +3333,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;
@@ -3547,7 +3547,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") &&
@@ -3570,14 +3570,14 @@ qemuBuildMemoryBackendProps(virJSONValuePtr *backendProps,
             return -1;
         }
 
-        ret = 0;
+        rc = 0;
     }
 
     if (!(*backendProps = qemuMonitorCreateObjectPropsWrap(backendType, alias,
                                                            &props)))
-        ret = -1;
+        return -1;
 
-    return ret;
+    return rc;
 }