conf: domain: Remove pointless XML node name validation in virSysinfoSystemParseXML

The only caller passes 'node' argument originating from an XPath lookup
for the 'system' 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 e40f8649bf
commit 1f0745154d

View File

@ -12133,12 +12133,6 @@ virSysinfoSystemParseXML(xmlNodePtr node,
ctxt->node = node;
if (!virXMLNodeNameEqual(node, "system")) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("XML does not contain expected 'system' element"));
return -1;
}
def->manufacturer = virXPathString("string(entry[@name='manufacturer'])", ctxt);
def->product = virXPathString("string(entry[@name='product'])", ctxt);
def->version = virXPathString("string(entry[@name='version'])", ctxt);