From: Kristina Hanicova Date: Thu, 23 Sep 2021 23:30:48 +0000 (+0200) Subject: virsh: domain: fix mistake in cmdMigrateSetMaxDowntime() X-Git-Tag: v7.8.0-rc1~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0987edbedf96fc920a73213fdad1ad9a119cbee7;p=thirdparty%2Flibvirt.git virsh: domain: fix mistake in cmdMigrateSetMaxDowntime() 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 Reviewed-by: Michal Privoznik --- diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index bee3346eb0..af10569760 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -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;