From 39b9c1214827f0d83cd43d202fa2ef12b67d8f34 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Wed, 27 Aug 2014 08:35:08 -0400 Subject: [PATCH] qemu_command: Resolve Coverity REVERSE_INULL 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 9241f57af6..8fb81a4356 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; } -- GitLab