[PATCH 05/18] qemu: agent: Replace virJSONValueObjectCreate by virJSONValueObjectAdd

Peter Krempa pkrempa at redhat.com
Mon Nov 15 14:22:04 UTC 2021


virJSONValueObjectAdd now works identically to virJSONValueObjectCreate
when used with a NULL argument. Replace all callers.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 src/qemu/qemu_agent.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index e6d9e7ac50..8d470b090c 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -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);
-- 
2.31.1




More information about the libvir-list mailing list