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 b8dfc77cfc..52e1668010 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -10658,7 +10658,6 @@ virDomainChrSourceReconnectDefParseXML(virDomainChrSourceReconnectDefPtr def, xmlNodePtr node, xmlXPathContextPtr ctxt) { - int tmpVal; VIR_XPATH_NODE_AUTORESTORE(ctxt) xmlNodePtr cur; g_autofree char *tmp = NULL; @@ -10666,16 +10665,8 @@ virDomainChrSourceReconnectDefParseXML(virDomainChrSourceReconnectDefPtr def, ctxt->node = node; if ((cur = virXPathNode("./reconnect", ctxt))) { - if ((tmp = virXMLPropString(cur, "enabled"))) { - if ((tmpVal = virTristateBoolTypeFromString(tmp)) < 0) { - virReportError(VIR_ERR_XML_ERROR, - _("invalid reconnect enabled value: '%s'"), - tmp); - return -1; - } - def->enabled = tmpVal; - VIR_FREE(tmp); - } + if (virXMLPropYesNo(cur, "enabled", &def->enabled) < 0) + return -1; if (def->enabled == VIR_TRISTATE_BOOL_YES) { if ((tmp = virXMLPropString(cur, "timeout"))) { -- 2.26.2