Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
src/conf/domain_conf.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 4debb895e9..0b009bb237 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -15705,16 +15705,8 @@ virDomainMemoryDefParseXML(virDomainXMLOptionPtr xmlopt,
}
VIR_FREE(tmp);
- if ((tmp = virXMLPropString(memdevNode, "discard"))) {
- if ((val = virTristateBoolTypeFromString(tmp)) <= 0) {
- virReportError(VIR_ERR_XML_ERROR,
- _("invalid discard value '%s'"), tmp);
- goto error;
- }
-
- def->discard = val;
- }
- VIR_FREE(tmp);
+ if (virXMLPropTristateBool(memdevNode, "discard", false,
&def->discard) < 0)
+ goto error;
/* Extract NVDIMM UUID. */
if (def->model == VIR_DOMAIN_MEMORY_MODEL_NVDIMM &&
--
2.26.2