Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx> --- src/conf/domain_conf.c | 4 +++- src/conf/storage_source_conf.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3d24479f28..27eb98d93c 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8478,12 +8478,14 @@ virDomainDiskSourceNVMeParse(xmlNodePtr node, } if ((managed = virXMLPropString(node, "managed"))) { - if ((nvme->managed = virTristateBoolTypeFromString(managed)) <= 0) { + int value; + if ((value = virTristateBoolTypeFromString(managed)) <= 0) { virReportError(VIR_ERR_XML_ERROR, _("malformed managed value '%s'"), managed); return -1; } + nvme->managed = value; } if (!(address = virXPathNode("./address", ctxt))) { diff --git a/src/conf/storage_source_conf.h b/src/conf/storage_source_conf.h index e6702a1ffc..1783dc195e 100644 --- a/src/conf/storage_source_conf.h +++ b/src/conf/storage_source_conf.h @@ -251,7 +251,7 @@ typedef struct _virStorageSourceNVMeDef virStorageSourceNVMeDef; typedef virStorageSourceNVMeDef *virStorageSourceNVMeDefPtr; struct _virStorageSourceNVMeDef { unsigned long long namespc; - int managed; /* enum virTristateBool */ + virTristateBool managed; virPCIDeviceAddress pciAddr; /* Don't forget to update virStorageSourceNVMeDefCopy */ -- 2.26.2