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

Ján Tomko jtomko at redhat.com
Thu Feb 18 12:46:30 UTC 2021


On a Thursday in 2021, 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.

There is no need to enumerate all the entities that missed the mistake,
especially not the reviewer! O:-)

>
>LUckily John Ferlan caught this up with his Coverity scan and spared us

s/LU/Lu/

>from an unneeded headache later on.
>
>Fixes: 76f47889326c45d2732711bc6dd5751aaf6e5194
>Reported-by: John Ferlan <jferlan at redhat.com>
>Signed-off-by: Daniel Henrique Barboza <danielhb413 at gmail.com>
>---
> src/qemu/qemu_driver.c | 26 +++++++++++++++-----------
> 1 file changed, 15 insertions(+), 11 deletions(-)
>

with the typo fixed:
Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20210218/58ed54af/attachment-0001.sig>


More information about the libvir-list mailing list