|
|
d76c62 |
From ea4867bfe2c2990f62c3158b875f56dbf540f372 Mon Sep 17 00:00:00 2001
|
|
|
d76c62 |
Message-Id: <ea4867bfe2c2990f62c3158b875f56dbf540f372@dist-git>
|
|
|
d76c62 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Date: Tue, 4 Feb 2020 15:08:07 +0100
|
|
|
d76c62 |
Subject: [PATCH] qemuMigrationCookieAddNBD: Remove 'ret' variable and
|
|
|
d76c62 |
'cleanup' label
|
|
|
d76c62 |
MIME-Version: 1.0
|
|
|
d76c62 |
Content-Type: text/plain; charset=UTF-8
|
|
|
d76c62 |
Content-Transfer-Encoding: 8bit
|
|
|
d76c62 |
|
|
|
d76c62 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
d76c62 |
(cherry picked from commit d409411213152d204b85daf05468c4f7f17c1616)
|
|
|
d76c62 |
|
|
|
d76c62 |
https://bugzilla.redhat.com/show_bug.cgi?id=1793263
|
|
|
d76c62 |
Message-Id: <1feef9fdcf0e2f1178e8136192d91a6558cc6149.1580824112.git.pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
d76c62 |
---
|
|
|
d76c62 |
src/qemu/qemu_migration_cookie.c | 10 ++++------
|
|
|
d76c62 |
1 file changed, 4 insertions(+), 6 deletions(-)
|
|
|
d76c62 |
|
|
|
d76c62 |
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
|
|
|
d76c62 |
index 968a9b589c..734d95f4f1 100644
|
|
|
d76c62 |
--- a/src/qemu/qemu_migration_cookie.c
|
|
|
d76c62 |
+++ b/src/qemu/qemu_migration_cookie.c
|
|
|
d76c62 |
@@ -456,7 +456,7 @@ qemuMigrationCookieAddNBD(qemuMigrationCookiePtr mig,
|
|
|
d76c62 |
qemuDomainObjPrivatePtr priv = vm->privateData;
|
|
|
d76c62 |
g_autoptr(virHashTable) stats = virHashNew(virHashValueFree);
|
|
|
d76c62 |
size_t i;
|
|
|
d76c62 |
- int ret = -1, rc;
|
|
|
d76c62 |
+ int rc;
|
|
|
d76c62 |
|
|
|
d76c62 |
/* It is not a bug if there already is a NBD data */
|
|
|
d76c62 |
qemuMigrationCookieNBDFree(mig->nbd);
|
|
|
d76c62 |
@@ -473,10 +473,10 @@ qemuMigrationCookieAddNBD(qemuMigrationCookiePtr mig,
|
|
|
d76c62 |
mig->nbd->ndisks = 0;
|
|
|
d76c62 |
|
|
|
d76c62 |
if (qemuDomainObjEnterMonitorAsync(driver, vm, priv->job.asyncJob) < 0)
|
|
|
d76c62 |
- goto cleanup;
|
|
|
d76c62 |
+ return -1;
|
|
|
d76c62 |
rc = qemuMonitorBlockStatsUpdateCapacity(priv->mon, stats, false);
|
|
|
d76c62 |
if (qemuDomainObjExitMonitor(driver, vm) < 0 || rc < 0)
|
|
|
d76c62 |
- goto cleanup;
|
|
|
d76c62 |
+ return -1;
|
|
|
d76c62 |
|
|
|
d76c62 |
for (i = 0; i < vm->def->ndisks; i++) {
|
|
|
d76c62 |
virDomainDiskDefPtr disk = vm->def->disks[i];
|
|
|
d76c62 |
@@ -491,9 +491,7 @@ qemuMigrationCookieAddNBD(qemuMigrationCookiePtr mig,
|
|
|
d76c62 |
mig->nbd->ndisks++;
|
|
|
d76c62 |
}
|
|
|
d76c62 |
|
|
|
d76c62 |
- ret = 0;
|
|
|
d76c62 |
- cleanup:
|
|
|
d76c62 |
- return ret;
|
|
|
d76c62 |
+ return 0;
|
|
|
d76c62 |
}
|
|
|
d76c62 |
|
|
|
d76c62 |
|
|
|
d76c62 |
--
|
|
|
d76c62 |
2.25.0
|
|
|
d76c62 |
|