From 1f0745154d59f7b34afe28314388f95a8dca8c3a Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 6 Oct 2022 11:12:51 +0200 Subject: [PATCH] conf: domain: Remove pointless XML node name validation in virSysinfoSystemParseXML MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/conf/domain_conf.c | 6 ------ 1 file changed, 6 deletions(-) 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); -- 2.47.2