From: Peter Krempa Date: Thu, 17 May 2018 08:09:10 +0000 (+0200) Subject: qemu: command: Optimize formatting of 'passwordid' in qemuBuildTLSx509BackendProps X-Git-Tag: v4.4.0-rc1~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f501206934b8f6a380d732ec794c8710009550e;p=thirdparty%2Flibvirt.git qemu: command: Optimize formatting of 'passwordid' in qemuBuildTLSx509BackendProps Use the 'S' modifier for create the field optionally rather than calling another JSON formatter function. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- 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: