return -1;
}
- if ((haveTLS = virXMLPropString(node, "tls")) &&
- (src->haveTLS = virTristateBoolTypeFromString(haveTLS)) <= 0) {
- virReportError(VIR_ERR_XML_ERROR,
- _("unknown disk source 'tls' setting '%s'"), haveTLS);
+ if ((haveTLS = virXMLPropString(node, "tls"))) {
+ int value;
+
+ if ((value = virTristateBoolTypeFromString(haveTLS)) <= 0) {
+ virReportError(VIR_ERR_XML_ERROR,
+ _("unknown disk source 'tls' setting '%s'"), haveTLS);
return -1;
+ }
+ src->haveTLS = value;
}
if ((flags & VIR_DOMAIN_DEF_PARSE_STATUS) &&
char *nodestorage; /* name of the storage object */
/* An optional setting to enable usage of TLS for the storage source */
- int haveTLS; /* enum virTristateBool */
+ virTristateBool haveTLS;
/* Indication whether the haveTLS value was altered due to qemu.conf
* setting when haveTLS is missing from the domain config file */