[PATCH 13/13] qemuMonitorJSONGetStringListProperty: Don't return element count

Peter Krempa pkrempa at redhat.com
Tue Jun 15 10:27:26 UTC 2021


The only caller doesn't care about the number of elements in the string
list so we don't have to calculate it.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 src/qemu/qemu_monitor_json.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 340d8a1027..223777739d 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -6524,7 +6524,7 @@ qemuMonitorJSONGetStringListProperty(qemuMonitor *mon,
     if (!(*strList = virJSONValueObjectGetStringArray(reply, "return")))
         return -1;

-    return g_strv_length(*strList);
+    return 0;
 }


-- 
2.31.1




More information about the libvir-list mailing list