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 <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2022-10-06 11:12:51 +02:00
parent 75849b7503
commit 1812ef5f9a

View 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;