render / rpms / libvirt

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