]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuMonitorGetPRManagerInfo: Remove superfluous `goto`s
authorTim Wiederhake <twiederh@redhat.com>
Mon, 5 Jul 2021 14:06:35 +0000 (16:06 +0200)
committerTim Wiederhake <twiederh@redhat.com>
Mon, 19 Jul 2021 14:39:41 +0000 (16:39 +0200)
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_monitor.c

index 36b1f15c7d9e7938b631af73180e5604d700e4f9..b06c842a7a42873235afed610895b5cd9766e647 100644 (file)
@@ -4515,7 +4515,6 @@ int
 qemuMonitorGetPRManagerInfo(qemuMonitor *mon,
                             GHashTable **retinfo)
 {
-    int ret = -1;
     g_autoptr(GHashTable) info = virHashNew(g_free);
 
     *retinfo = NULL;
@@ -4523,12 +4522,10 @@ qemuMonitorGetPRManagerInfo(qemuMonitor *mon,
     QEMU_CHECK_MONITOR(mon);
 
     if (qemuMonitorJSONGetPRManagerInfo(mon, info) < 0)
-        goto cleanup;
+        return -1;
 
     *retinfo = g_steal_pointer(&info);
-    ret = 0;
- cleanup:
-    return ret;
+    return 0;
 }