]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu_command: Resolve Coverity REVERSE_INULL
authorJohn Ferlan <jferlan@redhat.com>
Wed, 27 Aug 2014 12:35:08 +0000 (08:35 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 27 Aug 2014 16:52:27 +0000 (12:52 -0400)
In qemuNetworkIfaceConnect() a call to virNetDevBandwidthSet() is
made where the function prototype requires the first parameter
(net->ifname) to be non NULL.  Coverity complains that the subsequent
non NULL check for net->ifname prior to the next call gets flagged as
an unnecessary check.  Resolve by removing the extra check

src/qemu/qemu_command.c

index 9241f57af6b5d6e92dc88000ea8ef1c8aaab4630..8fb81a43562630a4e7db5ba84cc07a73de30519d 100644 (file)
@@ -370,7 +370,7 @@ qemuNetworkIfaceConnect(virDomainDefPtr def,
                               false) < 0)
         goto cleanup;
 
-    if (net->filter && net->ifname &&
+    if (net->filter &&
         virDomainConfNWFilterInstantiate(conn, def->uuid, net) < 0) {
         goto cleanup;
     }