virsh: domain: 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:
Peter Krempa 2021-11-08 17:24:50 +01:00
parent bd9dcd2b4b
commit 813ee9fb62

View File

@ -9623,10 +9623,10 @@ cmdQemuMonitorCommandQMPWrap(vshControl *ctl,
} }
} }
if (virJSONValueObjectCreate(&command, if (virJSONValueObjectAdd(&command,
"s:execute", commandname, "s:execute", commandname,
"A:arguments", &arguments, "A:arguments", &arguments,
NULL) < 0) NULL) < 0)
return NULL; return NULL;
return virJSONValueToString(command, false); return virJSONValueToString(command, false);