mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
qemu: migration_params: 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
829b6982cc
commit
bd9dcd2b4b
@ -790,10 +790,10 @@ qemuMigrationCapsToJSON(virBitmap *caps,
|
||||
if (!virBitmapIsBitSet(caps, bit))
|
||||
continue;
|
||||
|
||||
if (virJSONValueObjectCreate(&cap,
|
||||
"s:capability", qemuMigrationCapabilityTypeToString(bit),
|
||||
"b:state", virBitmapIsBitSet(states, bit),
|
||||
NULL) < 0)
|
||||
if (virJSONValueObjectAdd(&cap,
|
||||
"s:capability", qemuMigrationCapabilityTypeToString(bit),
|
||||
"b:state", virBitmapIsBitSet(states, bit),
|
||||
NULL) < 0)
|
||||
return NULL;
|
||||
|
||||
if (virJSONValueArrayAppend(json, &cap) < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user