[PATCH 07/18] qemu: monitor: Replace virJSONValueObjectCreate by virJSONValueObjectAdd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_monitor.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 398bef2e96..ac988e063b 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -2880,10 +2880,10 @@ qemuMonitorCreateObjectProps(virJSONValue **propsret,
     int rc;
     va_list args;

-    if (virJSONValueObjectCreate(&props,
-                                 "s:qom-type", type,
-                                 "s:id", alias,
-                                 NULL) < 0)
+    if (virJSONValueObjectAdd(&props,
+                              "s:qom-type", type,
+                              "s:id", alias,
+                              NULL) < 0)
         return -1;


@@ -2961,11 +2961,11 @@ qemuMonitorAddObject(qemuMonitor *mon,
             *props = NULL;
         }

-        if (virJSONValueObjectCreate(&pr,
-                                     "s:qom-type", type,
-                                     "s:id", id,
-                                     "A:props", props,
-                                     NULL) < 0)
+        if (virJSONValueObjectAdd(&pr,
+                                  "s:qom-type", type,
+                                  "s:id", id,
+                                  "A:props", props,
+                                  NULL) < 0)
             return -1;
     }

-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux