From: Tim Wiederhake Date: Mon, 5 Jul 2021 14:06:35 +0000 (+0200) Subject: qemuMonitorGetPRManagerInfo: Remove superfluous `goto`s X-Git-Tag: v7.6.0-rc1~150 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91fc0a36aa9df0ccb0b98b2c9e4389a118da694d;p=thirdparty%2Flibvirt.git qemuMonitorGetPRManagerInfo: Remove superfluous `goto`s Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 36b1f15c7d..b06c842a7a 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -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; }