From: Peter Krempa Date: Thu, 6 Oct 2022 09:12:51 +0000 (+0200) Subject: conf: domain: Remove pointless XML node name validation in virSysinfoParseXML X-Git-Tag: v8.10.0-rc1~207 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1812ef5f9a3541d6facdcfc498c6fa3eb777c163;p=thirdparty%2Flibvirt.git conf: domain: Remove pointless XML node name validation in virSysinfoParseXML 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 --- 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;