]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: domain: 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>
tools/virsh-domain.c

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