]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf: domain: Remove pointless XML node name validation in virSysinfoParseXML
authorPeter Krempa <pkrempa@redhat.com>
Thu, 6 Oct 2022 09:12:51 +0000 (11:12 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 2 Nov 2022 08:22:56 +0000 (09:22 +0100)
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 <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/domain_conf.c

index 25288cc5a36bace66b391d3f0b2b896a6a59a95b..4cd9ffc194123c7ecb5e8be1c26d28874fb0ce77 100644 (file)
@@ -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;