From: John Ferlan Date: Wed, 27 Aug 2014 12:35:08 +0000 (-0400) Subject: qemu_command: Resolve Coverity REVERSE_INULL X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=39b9c1214827f0d83cd43d202fa2ef12b67d8f34;p=people%2Fliuw%2Flibxenctrl-split%2Flibvirt.git 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 --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 9241f57af..8fb81a435 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; }