[PATCH 2/2] qemu: remove else branches after return in qemuMigrationSrcPerform()

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

 



Signed-off-by: Kristina Hanicova <khanicov@xxxxxxxxxx>
---
 src/qemu/qemu_migration.c | 46 +++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 24 deletions(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index e16d579928..d8b00aca87 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -5482,31 +5482,29 @@ qemuMigrationSrcPerform(virQEMUDriver *driver,
                                           cookiein, cookieinlen,
                                           cookieout, cookieoutlen,
                                           flags, dname, resource, v3proto);
-    } else {
-        if (dconnuri) {
-            virReportError(VIR_ERR_INTERNAL_ERROR,
-                           "%s", _("Unexpected dconnuri parameter with non-peer2peer migration"));
-            return -1;
-        }
-
-        if (v3proto) {
-            return qemuMigrationSrcPerformPhase(driver, conn, vm, persist_xml, uri,
-                                                graphicsuri,
-                                                nmigrate_disks, migrate_disks,
-                                                migParams,
-                                                cookiein, cookieinlen,
-                                                cookieout, cookieoutlen,
-                                                flags, resource, nbdURI);
-        } else {
-            return qemuMigrationSrcPerformJob(driver, conn, vm, xmlin, persist_xml, NULL,
-                                              uri, graphicsuri, listenAddress,
-                                              nmigrate_disks, migrate_disks, nbdPort,
-                                              nbdURI, migParams,
-                                              cookiein, cookieinlen,
-                                              cookieout, cookieoutlen, flags,
-                                              dname, resource, v3proto);
-        }
     }
+    if (dconnuri) {
+        virReportError(VIR_ERR_INTERNAL_ERROR,
+                       "%s", _("Unexpected dconnuri parameter with non-peer2peer migration"));
+        return -1;
+    }
+
+    if (v3proto) {
+        return qemuMigrationSrcPerformPhase(driver, conn, vm, persist_xml, uri,
+                                            graphicsuri,
+                                            nmigrate_disks, migrate_disks,
+                                            migParams,
+                                            cookiein, cookieinlen,
+                                            cookieout, cookieoutlen,
+                                            flags, resource, nbdURI);
+    }
+    return qemuMigrationSrcPerformJob(driver, conn, vm, xmlin, persist_xml, NULL,
+                                      uri, graphicsuri, listenAddress,
+                                      nmigrate_disks, migrate_disks, nbdPort,
+                                      nbdURI, migParams,
+                                      cookiein, cookieinlen,
+                                      cookieout, cookieoutlen, flags,
+                                      dname, resource, v3proto);
 }
 
 static int
-- 
2.35.1




[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