[libvirt] [PATCH 06/10] qemu_command: Resolve Coverity REVERSE_INULL

John Ferlan jferlan at redhat.com
Wed Aug 27 13:51:29 UTC 2014


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

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 src/qemu/qemu_command.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 9241f57..8fb81a4 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -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;
     }
-- 
1.9.3




More information about the libvir-list mailing list