mirror of https://gitee.com/openkylin/libvirt.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 <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
9a33776715
commit
8f50120693
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue