From 1812ef5f9a3541d6facdcfc498c6fa3eb777c163 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 virSysinfoParseXML 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 'sysinfo' 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 25288cc5a3..4cd9ffc194 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -12398,12 +12398,6 @@ virSysinfoParseXML(xmlNodePtr node, ctxt->node = node; - if (!virXMLNodeNameEqual(node, "sysinfo")) { - virReportError(VIR_ERR_XML_ERROR, "%s", - _("XML does not contain expected 'sysinfo' element")); - return NULL; - } - if (virXMLPropEnum(node, "type", virSysinfoTypeFromString, VIR_XML_PROP_REQUIRED, &def->type) < 0) return NULL; -- 2.47.2