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>
"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: