[PATCH 1/4] qemu: command: Optimize formatting of 'passwordid' in qemuBuildTLSx509BackendProps

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

 



Use the 'S' modifier for create the field optionally rather than calling
another JSON formatter function.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_command.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index c4237339bf..173745ee49 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -731,13 +731,10 @@ qemuBuildTLSx509BackendProps(const char *tlspath,
                                  "s:dir", path,
                                  "s:endpoint", (isListen ? "server": "client"),
                                  "b:verify-peer", (isListen ? verifypeer : true),
+                                 "S:passwordid", secalias,
                                  NULL) < 0)
         goto cleanup;

-    if (secalias &&
-        virJSONValueObjectAdd(*propsret, "s:passwordid", secalias, NULL) < 0)
-        goto cleanup;
-
     ret = 0;

  cleanup:
-- 
2.16.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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