mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
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:
parent
e40f8649bf
commit
1f0745154d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user