]> git.ipfire.org Git - thirdparty/libvirt.git/commit
network_conf: Resolve Coverity FORWARD_NULL
authorJohn Ferlan <jferlan@redhat.com>
Thu, 4 Sep 2014 21:59:20 +0000 (17:59 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 11 Sep 2014 12:10:14 +0000 (08:10 -0400)
commit8ffab1010a78e2cd14860f8bc02527c6f35209d6
tree29ff077d17450b0ed03f38f413ac2d75d30e0793
parente5baef83e131c75bda00bed59b7b2494675b4451
network_conf: Resolve Coverity FORWARD_NULL

The code compares def->forwarders when deciding to return 0 at a
couple of points, then uses "def->nfwds" as a way to index into
the def->forwarders array.  That reference results in Coverity
complaining that def->forwarders being NULL was checked as part
of an arithmetic OR operation where failure could be any one 5
conditions, but that is not checked when entering the loop to
dereference the array.  Changing the comparisons to use nfwds
will clear the warnings

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/conf/network_conf.c