mirror of
https://github.com/libvirt/libvirt.git
synced 2026-07-31 08:38:16 -05:00
virsh: domain: remove unnecessary variable and label in cmdMigrateSetMaxDowntime()
Signed-off-by: Kristina Hanicova <khanicov@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
committed by
Michal Privoznik
parent
0987edbedf
commit
bc7b8a34fa
+4
-10
@@ -10988,25 +10988,19 @@ cmdMigrateSetMaxDowntime(vshControl *ctl, const vshCmd *cmd)
|
||||
{
|
||||
g_autoptr(virshDomain) dom = NULL;
|
||||
unsigned long long downtime = 0;
|
||||
bool ret = false;
|
||||
|
||||
if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))
|
||||
return false;
|
||||
|
||||
if (vshCommandOptULongLong(ctl, cmd, "downtime", &downtime) < 0)
|
||||
goto done;
|
||||
return false;
|
||||
|
||||
if (downtime < 1) {
|
||||
vshError(ctl, "%s", _("migrate: Invalid downtime"));
|
||||
goto done;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (virDomainMigrateSetMaxDowntime(dom, downtime, 0) < 0)
|
||||
goto done;
|
||||
|
||||
ret = true;
|
||||
|
||||
done:
|
||||
return ret;
|
||||
return virDomainMigrateSetMaxDowntime(dom, downtime, 0) == 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user