[PATCH 08/11] conf: domain: Remove pointless XML node name validation in virSysinfoChassisParseXML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The only caller passes 'node' argument originating from an XPath lookup
for the 'chassis' element, so there's no point in checking it once more.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index e10b4d72f8..6379cfda7c 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -12327,12 +12327,6 @@ virSysinfoChassisParseXML(xmlNodePtr node,

     ctxt->node = node;

-    if (!xmlStrEqual(node->name, BAD_CAST "chassis")) {
-        virReportError(VIR_ERR_XML_ERROR, "%s",
-                       _("XML does not contain expected 'chassis' element"));
-        return -1;
-    }
-
     def->manufacturer = virXPathString("string(entry[@name='manufacturer'])", ctxt);
     def->version = virXPathString("string(entry[@name='version'])", ctxt);
     def->serial = virXPathString("string(entry[@name='serial'])", ctxt);
-- 
2.37.3




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux