From: Peter Krempa Date: Mon, 8 Nov 2021 16:24:50 +0000 (+0100) Subject: qemu: monitor: Replace virJSONValueObjectCreate by virJSONValueObjectAdd X-Git-Tag: v7.10.0-rc1~120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d53be3fe93055eaf27640208f61c49e4a4068e86;p=thirdparty%2Flibvirt.git qemu: monitor: Replace virJSONValueObjectCreate by virJSONValueObjectAdd virJSONValueObjectAdd now works identically to virJSONValueObjectCreate when used with a NULL argument. Replace all callers. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 398bef2e96..ac988e063b 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2880,10 +2880,10 @@ qemuMonitorCreateObjectProps(virJSONValue **propsret, int rc; va_list args; - if (virJSONValueObjectCreate(&props, - "s:qom-type", type, - "s:id", alias, - NULL) < 0) + if (virJSONValueObjectAdd(&props, + "s:qom-type", type, + "s:id", alias, + NULL) < 0) return -1; @@ -2961,11 +2961,11 @@ qemuMonitorAddObject(qemuMonitor *mon, *props = NULL; } - if (virJSONValueObjectCreate(&pr, - "s:qom-type", type, - "s:id", id, - "A:props", props, - NULL) < 0) + if (virJSONValueObjectAdd(&pr, + "s:qom-type", type, + "s:id", id, + "A:props", props, + NULL) < 0) return -1; }