Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
src/conf/domain_conf.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 842a134220..35320fe1e5 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -13043,7 +13043,6 @@ virDomainGraphicsDefParseXMLVNC(virDomainGraphicsDefPtr def,
g_autofree char *websocketGenerated = virXMLPropString(node,
"websocketGenerated");
g_autofree char *sharePolicy = virXMLPropString(node, "sharePolicy");
g_autofree char *autoport = virXMLPropString(node, "autoport");
- g_autofree char *powerControl = virXMLPropString(node, "powerControl");
xmlNodePtr audioNode;
VIR_XPATH_NODE_AUTORESTORE(ctxt)
@@ -13102,15 +13101,9 @@ virDomainGraphicsDefParseXMLVNC(virDomainGraphicsDefPtr def,
}
}
- if (powerControl) {
- int powerControlVal = virTristateBoolTypeFromString(powerControl);
- if (powerControlVal < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot parse vnc power control '%s'"),
powerControl);
- return -1;
- }
- def->data.vnc.powerControl = powerControlVal;
- }
+ if ((virXMLPropTristateBool(node, "powerControl", false,
+ &def->data.vnc.powerControl)) < 0)
+ return -1;
def->data.vnc.keymap = virXMLPropString(node, "keymap");
--
2.26.2