Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx> --- src/conf/numa_conf.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c index 64b93fd7d1..d16a44c955 100644 --- a/src/conf/numa_conf.c +++ b/src/conf/numa_conf.c @@ -1079,17 +1079,8 @@ virDomainNumaDefParseXML(virDomainNumaPtr def, VIR_FREE(tmp); } - if ((tmp = virXMLPropString(nodes[i], "discard"))) { - if ((rc = virTristateBoolTypeFromString(tmp)) <= 0) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid 'discard' attribute value '%s'"), - tmp); - goto cleanup; - } - - def->mem_nodes[cur_cell].discard = rc; - VIR_FREE(tmp); - } + if (virXMLPropYesNo(nodes[i], "discard", &def->mem_nodes[cur_cell].discard) < 0) + goto cleanup; /* Parse NUMA distances info */ if (virDomainNumaDefNodeDistanceParseXML(def, ctxt, cur_cell) < 0) -- 2.26.2