[PATCH 7/7] qemuBuildMemoryCellBackendStr: remove useless ret variable

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

 



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

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 528e11d5a0..18b3914ca9 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3588,14 +3588,13 @@ qemuBuildMemoryCellBackendStr(virDomainDefPtr def,
 {
     VIR_AUTOPTR(virJSONValue) props = NULL;
     VIR_AUTOFREE(char *) alias = NULL;
-    int ret = -1;
     int rc;
     virDomainMemoryDef mem = { 0 };
     unsigned long long memsize = virDomainNumaGetNodeMemorySize(def->numa,
                                                                 cell);
 
     if (virAsprintf(&alias, "ram-node%zu", cell) < 0)
-        goto cleanup;
+        return -1;
 
     mem.size = memsize;
     mem.targetNode = cell;
@@ -3603,16 +3602,12 @@ qemuBuildMemoryCellBackendStr(virDomainDefPtr def,
 
     if ((rc = qemuBuildMemoryBackendProps(&props, alias, cfg,
                                           priv, def, &mem, false)) < 0)
-        goto cleanup;
+        return -1;
 
     if (virQEMUBuildObjectCommandlineFromJSON(buf, props) < 0)
-        goto cleanup;
-
-    ret = rc;
-
- cleanup:
+        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