]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: domain: fix mistake in cmdMigrateSetMaxDowntime()
authorKristina Hanicova <khanicov@redhat.com>
Thu, 23 Sep 2021 23:30:48 +0000 (01:30 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Sat, 25 Sep 2021 07:14:56 +0000 (09:14 +0200)
If there was added a new return value indicating success to the
function virDomainMigrateSetMaxDowntime() in the future, because
of the way the function is called it would be treated it as an
error state and would return false (indicating failure). This
patch fixes it, so that the call of the function follows the same
pattern as is currently set in libvirt.

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tools/virsh-domain.c

index bee3346eb0effc3d9655d87418f2b11f887faadf..af105697601de1fc70bb8ef186f27d7efa27d69c 100644 (file)
@@ -11000,7 +11000,7 @@ cmdMigrateSetMaxDowntime(vshControl *ctl, const vshCmd *cmd)
         goto done;
     }
 
-    if (virDomainMigrateSetMaxDowntime(dom, downtime, 0))
+    if (virDomainMigrateSetMaxDowntime(dom, downtime, 0) < 0)
         goto done;
 
     ret = true;