]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: agent: Replace virJSONValueObjectCreate by virJSONValueObjectAdd
authorPeter Krempa <pkrempa@redhat.com>
Mon, 8 Nov 2021 16:24:50 +0000 (17:24 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 17 Nov 2021 11:04:11 +0000 (12:04 +0100)
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>
src/qemu/qemu_agent.c

index e6d9e7ac5027cc1124d576178c052b4c03fc2cd4..8d470b090ceb6ff51359e2dcdba8c4d943df1f74 100644 (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);