]> xenbits.xensource.com Git - libvirt.git/commitdiff
openvzDomainMigratePrepare3Params: remove else after goto
authorJán Tomko <jtomko@redhat.com>
Thu, 19 Nov 2020 10:06:56 +0000 (11:06 +0100)
committerJán Tomko <jtomko@redhat.com>
Thu, 19 Nov 2020 14:21:59 +0000 (15:21 +0100)
We jump to the error label if the 'if' condition is true.
Remove the explicit else to make it more obvious that 'hostname'
is filled on both branches of 'if (!uri_in)'.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
src/openvz/openvz_driver.c

index 4fa7511f88c45514d5113d03016c2be453525c68..c6b7e21e7a68075dcd03aa5f77fe38aaa48dd1f0 100644 (file)
@@ -2130,9 +2130,9 @@ openvzDomainMigratePrepare3Params(virConnectPtr dconn,
                            _("missing host in migration URI: %s"),
                            uri_in);
             goto error;
-        } else {
-            hostname = uri->server;
         }
+
+        hostname = uri->server;
     }
 
     *uri_out = g_strdup_printf("ssh://%s", hostname);