]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: monitor: Use qemuMonitorJSONGetReply in conjunction with virJSONValueArrayToStr...
authorPeter Krempa <pkrempa@redhat.com>
Thu, 1 Dec 2022 16:19:50 +0000 (17:19 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 2 Dec 2022 15:18:37 +0000 (16:18 +0100)
commit5baeebef0f64b3d04754fe754f56b3a013183f41
tree86917e29dcfb9a5f2f59f97a50352f21caca2232
parent6b3bc1cb2cb05c636046dc90b9072d4acf2c2b85
qemu: monitor: Use qemuMonitorJSONGetReply in conjunction with virJSONValueArrayToStringList

In two instances (qemuMonitorJSONGetStringListProperty,
qemuMonitorJSONGetStringArray) the return value is checked by
qemuMonitorJSONCheckReply and extracted by
virJSONValueObjectGetStringArray.

We can use qemuMonitorJSONGetReply which returns it directly and then
virJSONValueArrayToStringList to convert it without the additional
lookup.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_monitor_json.c