From: Peter Krempa Date: Thu, 6 Oct 2022 09:12:51 +0000 (+0200) Subject: conf: domain: Remove pointless XML node name validation in virSysinfoSystemParseXML X-Git-Tag: v8.10.0-rc1~213 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f0745154d59f7b34afe28314388f95a8dca8c3a;p=thirdparty%2Flibvirt.git conf: domain: Remove pointless XML node name validation in virSysinfoSystemParseXML The only caller passes 'node' argument originating from an XPath lookup for the 'system' element, so there's no point in checking it once more. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e44d5fdc50..b901f46e6e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -12133,12 +12133,6 @@ virSysinfoSystemParseXML(xmlNodePtr node, ctxt->node = node; - if (!virXMLNodeNameEqual(node, "system")) { - virReportError(VIR_ERR_XML_ERROR, "%s", - _("XML does not contain expected 'system' element")); - return -1; - } - def->manufacturer = virXPathString("string(entry[@name='manufacturer'])", ctxt); def->product = virXPathString("string(entry[@name='product'])", ctxt); def->version = virXPathString("string(entry[@name='version'])", ctxt);