]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuConnectStealCPUModelFromInfo: Drop needless 'cleanup' label
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 1 Nov 2021 09:37:11 +0000 (10:37 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 11 Nov 2021 15:16:25 +0000 (16:16 +0100)
Previous commit rendered 'cleanup' label and @ret variable
redundant. The same result can be achieved by returning 0/-1
directly.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
src/qemu/qemu_driver.c

index bf3b528c5fa4d9910558cabf8dd49a3a025bc755..d954635dde2ad0f80c9d53a79d6887b7cdf083c4 100644 (file)
@@ -12398,7 +12398,6 @@ qemuConnectStealCPUModelFromInfo(virCPUDef *dst,
 {
     g_autoptr(qemuMonitorCPUModelInfo) info = NULL;
     size_t i;
-    int ret = -1;
 
     virCPUDefFreeModel(dst);
 
@@ -12413,13 +12412,10 @@ qemuConnectStealCPUModelFromInfo(virCPUDef *dst,
             continue;
 
         if (virCPUDefAddFeature(dst, name, VIR_CPU_FEATURE_REQUIRE) < 0)
-            goto cleanup;
+            return -1;
     }
 
-    ret = 0;
-
- cleanup:
-    return ret;
+    return 0;
 }