Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
src/conf/domain_conf.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b28265cf4f..6ea347e05b 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -8453,7 +8453,6 @@ virDomainDiskSourceNVMeParse(xmlNodePtr node,
g_autoptr(virStorageSourceNVMeDef) nvme = NULL;
g_autofree char *type = NULL;
g_autofree char *namespc = NULL;
- g_autofree char *managed = NULL;
xmlNodePtr address;
nvme = g_new0(virStorageSourceNVMeDef, 1);
@@ -8484,16 +8483,9 @@ virDomainDiskSourceNVMeParse(xmlNodePtr node,
return -1;
}
- if ((managed = virXMLPropString(node, "managed"))) {
- int value;
- if ((value = virTristateBoolTypeFromString(managed)) <= 0) {
- virReportError(VIR_ERR_XML_ERROR,
- _("malformed managed value '%s'"),
- managed);
- return -1;
- }
- nvme->managed = value;
- }
+ if (virXMLPropTristateBool(node, "managed", VIR_XML_PROP_NONE,
+ &nvme->managed) < 0)
+ return -1;
if (!(address = virXPathNode("./address", ctxt))) {
virReportError(VIR_ERR_XML_ERROR, "%s",
--
2.26.3