]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuMonitorJSONGetStringListProperty: Don't return element count
authorPeter Krempa <pkrempa@redhat.com>
Mon, 14 Jun 2021 14:22:30 +0000 (16:22 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 15 Jun 2021 14:58:23 +0000 (16:58 +0200)
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@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_monitor_json.c

index 340d8a1027785c7a4a5184a8366f49863f9790ec..223777739d42957ab00f61548c1cf8ffee7aabfe 100644 (file)
@@ -6524,7 +6524,7 @@ qemuMonitorJSONGetStringListProperty(qemuMonitor *mon,
     if (!(*strList = virJSONValueObjectGetStringArray(reply, "return")))
         return -1;
 
-    return g_strv_length(*strList);
+    return 0;
 }