mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
qemuMigrationCookieAddNBD: Remove 'ret' variable and 'cleanup' label
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
45eefb2c78
commit
d409411213
@ -456,7 +456,7 @@ qemuMigrationCookieAddNBD(qemuMigrationCookiePtr mig,
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
g_autoptr(virHashTable) stats = virHashNew(virHashValueFree);
|
||||
size_t i;
|
||||
int ret = -1, rc;
|
||||
int rc;
|
||||
|
||||
/* It is not a bug if there already is a NBD data */
|
||||
qemuMigrationCookieNBDFree(mig->nbd);
|
||||
@ -473,10 +473,10 @@ qemuMigrationCookieAddNBD(qemuMigrationCookiePtr mig,
|
||||
mig->nbd->ndisks = 0;
|
||||
|
||||
if (qemuDomainObjEnterMonitorAsync(driver, vm, priv->job.asyncJob) < 0)
|
||||
goto cleanup;
|
||||
return -1;
|
||||
rc = qemuMonitorBlockStatsUpdateCapacity(priv->mon, stats, false);
|
||||
if (qemuDomainObjExitMonitor(driver, vm) < 0 || rc < 0)
|
||||
goto cleanup;
|
||||
return -1;
|
||||
|
||||
for (i = 0; i < vm->def->ndisks; i++) {
|
||||
virDomainDiskDefPtr disk = vm->def->disks[i];
|
||||
@ -491,9 +491,7 @@ qemuMigrationCookieAddNBD(qemuMigrationCookiePtr mig,
|
||||
mig->nbd->ndisks++;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user