Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
src/conf/domain_conf.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 920078a706..4fd4fabb3f 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -8274,7 +8274,6 @@ virDomainDiskSourceNetworkParse(xmlNodePtr node,
{
int tlsCfgVal;
g_autofree char *protocol = NULL;
- g_autofree char *haveTLS = NULL;
g_autofree char *tlsCfg = NULL;
g_autofree char *sslverifystr = NULL;
xmlNodePtr tmpnode;
@@ -8298,16 +8297,8 @@ virDomainDiskSourceNetworkParse(xmlNodePtr node,
return -1;
}
- if ((haveTLS = virXMLPropString(node, "tls"))) {
- int value;
-
- if ((value = virTristateBoolTypeFromString(haveTLS)) <= 0) {
- virReportError(VIR_ERR_XML_ERROR,
- _("unknown disk source 'tls' setting
'%s'"), haveTLS);
- return -1;
- }
- src->haveTLS = value;
- }
+ if (virXMLPropTristateBool(node, "tls", false, &src->haveTLS) <
0)
+ return -1;
if ((flags & VIR_DOMAIN_DEF_PARSE_STATUS) &&
(tlsCfg = virXMLPropString(node, "tlsFromConfig"))) {
--
2.26.2