From: Jiri Denemark <[email protected]>

The function is always called with both enabled and disabled pointers
set.

Signed-off-by: Jiri Denemark <[email protected]>
---
 src/qemu/qemu_monitor_json.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 6fa2f447db..06e0f3794e 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -6784,13 +6784,11 @@ qemuMonitorJSONGetGuestCPU(qemuMonitor *mon,
     if (qemuMonitorJSONCPUDataAddFeatures(cpuEnabled, propsEnabled, translate) 
< 0)
         return -1;
 
-    if (disabled &&
-        qemuMonitorJSONGetCPUDataDisabled(mon, cpuQOMPath, translate, 
cpuDisabled) < 0)
+    if (qemuMonitorJSONGetCPUDataDisabled(mon, cpuQOMPath, translate, 
cpuDisabled) < 0)
         return -1;
 
     *enabled = g_steal_pointer(&cpuEnabled);
-    if (disabled)
-        *disabled = g_steal_pointer(&cpuDisabled);
+    *disabled = g_steal_pointer(&cpuDisabled);
 
     return 0;
 }
-- 
2.51.0

Reply via email to