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 6a43fb2588..7e17ded2a1 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -10618,7 +10618,6 @@
virDomainChrSourceReconnectDefParseXML(virDomainChrSourceReconnectDefPtr def,
xmlNodePtr node,
xmlXPathContextPtr ctxt)
{
- int tmpVal;
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr cur;
g_autofree char *tmp = NULL;
@@ -10626,16 +10625,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 (virXMLPropTristateBool(cur, "enabled", false, &def->enabled)
< 0)
+ return -1;
if (def->enabled == VIR_TRISTATE_BOOL_YES) {
if ((tmp = virXMLPropString(cur, "timeout"))) {
--
2.26.2