]> xenbits.xensource.com Git - libvirt.git/commitdiff
networkBandwidthGenericChecks: Drop useless check
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 12 Aug 2015 08:34:39 +0000 (10:34 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 12 Aug 2015 08:57:36 +0000 (10:57 +0200)
There's a check right at the beginning of the function that
shortcuts if the function was called over all NULL arguments.
However, this was meant just as a fool-proof check so that we
don't crash if function is used in a bad manner. Anyway, it makes
Coverity unhappy as it then thinks any of the arguments could be
NULL. Well, with the current state of the code it can't.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/network/bridge_driver.c

index f57c4003d72d5ec18164a7046ee49cc4cc541640..c343e5bdd2dd97475c59cbcb9144fbb00d8c805e 100644 (file)
@@ -4960,9 +4960,6 @@ networkBandwidthGenericChecks(virDomainNetDefPtr iface,
     virNetDevBandwidthPtr ifaceBand;
     unsigned long long old_floor, new_floor;
 
-    if (!iface && !newBandwidth)
-        return false;
-
     if (virDomainNetGetActualType(iface) != VIR_DOMAIN_NET_TYPE_NETWORK) {
         /* This is not an interface that's plugged into a network.
          * We don't care. Thus from our POV bandwidth change is allowed. */