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 bcc89c0afc..fef0b7235a 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -10619,7 +10619,6 @@
virDomainChrSourceReconnectDefParseXML(virDomainChrSourceReconnectDefPtr def,
xmlNodePtr node,
xmlXPathContextPtr ctxt)
{
- int tmpVal;
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr cur;
g_autofree char *tmp = NULL;
@@ -10627,16 +10626,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