From: Peter Krempa Date: Mon, 14 Jun 2021 14:22:30 +0000 (+0200) Subject: qemuMonitorJSONGetStringListProperty: Don't return element count X-Git-Tag: v7.5.0-rc1~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d50abb80527d6dac8b427a825ace8316e0034e9;p=thirdparty%2Flibvirt.git qemuMonitorJSONGetStringListProperty: Don't return element count 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 Reviewed-by: Ján Tomko --- 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; }