提交 8f501206 编写于 作者: P Peter Krempa

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: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 9a337767
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册