mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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:
parent
75849b7503
commit
1812ef5f9a
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user