]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf: domain: Remove pointless XML node name validation in virSysinfoBIOSParseXML
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:55 +0000 (09:22 +0100)
The only caller passes 'node' argument originating from an XPath lookup
for the 'bios' 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 f8091b9fb55dac7c2c9bd135e93e7fe18d707096..d24c0a9d2b8577f62c080bd94560a5cf39fa2790 100644 (file)
@@ -12084,12 +12084,6 @@ virSysinfoBIOSParseXML(xmlNodePtr node,
 
     ctxt->node = node;
 
-    if (!virXMLNodeNameEqual(node, "bios")) {
-        virReportError(VIR_ERR_XML_ERROR, "%s",
-                       _("XML does not contain expected 'bios' element"));
-        return -1;
-    }
-
     def->vendor = virXPathString("string(entry[@name='vendor'])", ctxt);
     def->version = virXPathString("string(entry[@name='version'])", ctxt);
     def->date = virXPathString("string(entry[@name='date'])", ctxt);