mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
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 <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
d7ea3fe7f4
commit
d53be3fe93
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user