---
src/qemu/qemu_monitor.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 398c236..fcdd41d 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -1527,7 +1527,6 @@ qemuMonitorEmitSerialChange(qemuMonitorPtr mon,
int
qemuMonitorSetCapabilities(qemuMonitorPtr mon)
{
- int ret;
VIR_DEBUG("mon=%p", mon);
if (!mon) {
@@ -1536,16 +1535,10 @@ qemuMonitorSetCapabilities(qemuMonitorPtr mon)
return -1;
}
- if (mon->json) {
- ret = qemuMonitorJSONSetCapabilities(mon);
- if (ret < 0)
- goto cleanup;
- } else {
- ret = 0;
- }
+ if (!mon->json)
+ return 0;
- cleanup:
- return ret;
+ return qemuMonitorJSONSetCapabilities(mon);
}
--
2.3.5