qemu: agent: 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 7552031f57
commit 8de1edd5c7

View File

@ -1134,10 +1134,10 @@ qemuAgentMakeCommand(const char *cmdname,
va_end(args);
if (virJSONValueObjectCreate(&obj,
"s:execute", cmdname,
"A:arguments", &jargs,
NULL) < 0)
if (virJSONValueObjectAdd(&obj,
"s:execute", cmdname,
"A:arguments", &jargs,
NULL) < 0)
return NULL;
return g_steal_pointer(&obj);