]> xenbits.xensource.com Git - libvirt.git/commit
network: Use local variables in networkUpdatePortBandwidth
authorJohn Ferlan <jferlan@redhat.com>
Tue, 12 Nov 2019 21:15:04 +0000 (16:15 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 19 Nov 2019 12:02:02 +0000 (07:02 -0500)
commit10881fac46f881347272aa5ae11f42e0ebb62157
tree456d6b7b43b4dfa4f857577ae523b301a6567ed6
parentd70024d0a6c679433c6e7a4d90a8fe7ada6c0743
network: Use local variables in networkUpdatePortBandwidth

We go through the trouble of checking {old|new}Bandwidth[->in] and
storing the result in local @old_floor and @new_floor, but then
we don't use them. Instead we make derefs to the longer name. This
caused Coverity to note dereferencing newBandwidth->in without first
checking @newBandwidth like was done for new_floor could cause a
NULL dereference.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/network/bridge_driver.c