]> xenbits.xensource.com Git - libvirt.git/commitdiff
virNetDevBandwidthParse: Don't validate element name
authorPeter Krempa <pkrempa@redhat.com>
Mon, 13 Feb 2023 13:38:09 +0000 (14:38 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 5 Jun 2023 11:23:06 +0000 (13:23 +0200)
Callers make sure to pass the correct element.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/netdev_bandwidth_conf.c

index 1609b147846d2627ae7ecb66535a8536fa93ba42..48be9d2f38670000e1cd4ca9f4cf8189bceee6b8 100644 (file)
@@ -112,12 +112,6 @@ virNetDevBandwidthParse(virNetDevBandwidth **bandwidth,
 
     def = g_new0(virNetDevBandwidth, 1);
 
-    if (!node || !virXMLNodeNameEqual(node, "bandwidth")) {
-        virReportError(VIR_ERR_INVALID_ARG, "%s",
-                       _("invalid argument supplied"));
-        return -1;
-    }
-
     class_id_prop = virXMLPropString(node, "classID");
     if (class_id_prop) {
         if (!class_id) {