mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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:dir", path,
|
||||||
"s:endpoint", (isListen ? "server": "client"),
|
"s:endpoint", (isListen ? "server": "client"),
|
||||||
"b:verify-peer", (isListen ? verifypeer : true),
|
"b:verify-peer", (isListen ? verifypeer : true),
|
||||||
|
"S:passwordid", secalias,
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (secalias &&
|
|
||||||
virJSONValueObjectAdd(*propsret, "s:passwordid", secalias, NULL) < 0)
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
Loading…
Reference in New Issue
Block a user