Re: [PATCH] qemu_driver.c: Coverity fix in qemuNodeDeviceDetachFlags()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2/18/21 7:33 AM, Daniel Henrique Barboza wrote:
> Commit 76f47889326c4 made qemuNodeDeviceDetachFlags() unusable due to an
> 'if then else if' chain that will always results in a 'return -1',
> regardless of 'driverName' input. This slipped through review process
> and Gitlab CI, making it clear now that there is no unit tests
> exercising this code ATM.
> 
> LUckily John Ferlan caught this up with his Coverity scan and spared us
> from an unneeded headache later on.
> 
> Fixes: 76f47889326c45d2732711bc6dd5751aaf6e5194
> Reported-by: John Ferlan <jferlan@xxxxxxxxxx>
> Signed-off-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>
> ---
>  src/qemu/qemu_driver.c | 26 +++++++++++++++-----------
>  1 file changed, 15 insertions(+), 11 deletions(-)
> 

I can vouch this does make Coverity happy again.  I do agree w/ Jano no
need to be too elaborate on slipping thru cracks.... And when I do
create patches (rarely) now for Coverity, I'll just attribute it to
"Found by Coverity" and be done with it. You already put the Reported-by
so that's probably sufficient!

Reviewed-by: John Ferlan <jferlan@xxxxxxxxxx>

John




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux