Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/conf/domain_conf.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 1186ec8417..68191f42bd 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -6856,7 +6856,7 @@ virDomainHostdevSubsysUSBDefParseXML(xmlNodePtr node,
if (virXMLPropTristateBool(node, "autoAddress", VIR_XML_PROP_NONE,
&autoAddress) < 0)
return -1;
- usbsrc->autoAddress = autoAddress == VIR_TRISTATE_BOOL_YES;
+ virTristateBoolToBool(autoAddress, &usbsrc->autoAddress);
/* Product can validly be 0, so we need some extra help to determine
* if it is uninitialized */
@@ -12498,7 +12498,7 @@ virDomainGraphicsDefParseXMLSDL(virDomainGraphicsDef *def,
&fullscreen) < 0)
return -1;
- def->data.sdl.fullscreen = fullscreen == VIR_TRISTATE_BOOL_YES;
+ virTristateBoolToBool(fullscreen, &def->data.sdl.fullscreen);
def->data.sdl.xauth = virXMLPropString(node, "xauth");
def->data.sdl.display = virXMLPropString(node, "display");
@@ -12567,7 +12567,7 @@ virDomainGraphicsDefParseXMLDesktop(virDomainGraphicsDef *def,
&fullscreen) < 0)
return -1;
- def->data.desktop.fullscreen = fullscreen == VIR_TRISTATE_BOOL_YES;
+ virTristateBoolToBool(fullscreen, &def->data.desktop.fullscreen);
def->data.desktop.display = virXMLPropString(node, "display");
return 0;
@@ -12603,7 +12603,7 @@ virDomainGraphicsDefParseXMLSpice(virDomainGraphicsDef *def,
if (virXMLPropTristateBool(node, "autoport", VIR_XML_PROP_NONE,
&autoport) < 0)
return -1;
- def->data.spice.autoport = autoport == VIR_TRISTATE_BOOL_YES;
+ virTristateBoolToBool(autoport, &def->data.spice.autoport);
def->data.spice.defaultMode = VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_ANY;
if (virXMLPropEnum(node, "defaultMode",
@@ -14401,7 +14401,7 @@ virDomainRedirFilterUSBDevDefParseXML(xmlNodePtr node)
if (virXMLPropTristateBool(node, "allow", VIR_XML_PROP_REQUIRED,
&allow) < 0)
return NULL;
- def->allow = allow == VIR_TRISTATE_BOOL_YES;
+ virTristateBoolToBool(allow, &def->allow);
return g_steal_pointer(&def);
}
@@ -18071,7 +18071,7 @@ virDomainVcpuParse(virDomainDef *def,
VIR_XML_PROP_REQUIRED, &state) < 0)
return -1;
- vcpu->online = state == VIR_TRISTATE_BOOL_YES;
+ virTristateBoolToBool(state, &vcpu->online);
if (virXMLPropTristateBool(nodes[i], "hotpluggable",
VIR_XML_PROP_NONE,
--
2.35.1