Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx> --- 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 97eb1b6f8a..7fb096e6d9 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -11703,17 +11703,8 @@ virDomainChrSourceDefParseTCP(virDomainChrSourceDefPtr def, def->data.tcp.host = virXMLPropString(source, "host"); def->data.tcp.service = virXMLPropString(source, "service"); - if ((tmp = virXMLPropString(source, "tls"))) { - int value; - if ((value = virTristateBoolTypeFromString(tmp)) <= 0) { - virReportError(VIR_ERR_XML_ERROR, - _("unknown chardev 'tls' setting '%s'"), - tmp); - return -1; - } - def->data.tcp.haveTLS = value; - VIR_FREE(tmp); - } + if (virXMLPropTristateBool(source, "tls", false, &def->data.tcp.haveTLS) < 0) + return -1; if ((flags & VIR_DOMAIN_DEF_PARSE_STATUS) && (tmp = virXMLPropString(source, "tlsFromConfig"))) { -- 2.26.2