[libvirt] [PATCH] qemu: Remove coverity[negative_returns] annotation

Andrea Bolognani posted 1 patch 6 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1497860824-13116-1-git-send-email-abologna@redhat.com
src/qemu/qemu_hotplug.c | 1 -
1 file changed, 1 deletion(-)
[libvirt] [PATCH] qemu: Remove coverity[negative_returns] annotation
Posted by Andrea Bolognani 6 years, 9 months ago
It was added in commit 6c2e4c3856c8ed48c378bf1bf357cab46271a47a
so that Coverity would not complain about passing -1 to
qemuDomainDetachThisHostDevice(), but the function is question
has changed since and so the annotation doesn't apply anymore.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 src/qemu/qemu_hotplug.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 244dd5e..5247c06 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -5007,7 +5007,6 @@ qemuDomainDetachNetDevice(virQEMUDriverPtr driver,
     detach = vm->def->nets[detachidx];
 
     if (virDomainNetGetActualType(detach) == VIR_DOMAIN_NET_TYPE_HOSTDEV) {
-        /* coverity[negative_returns] */
         ret = qemuDomainDetachThisHostDevice(driver, vm,
                                              virDomainNetGetActualHostdev(detach));
         goto cleanup;
-- 
2.7.5

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: Remove coverity[negative_returns] annotation
Posted by Pavel Hrdina 6 years, 9 months ago
On Mon, Jun 19, 2017 at 04:27:04PM +0800, Andrea Bolognani wrote:
> It was added in commit 6c2e4c3856c8ed48c378bf1bf357cab46271a47a
> so that Coverity would not complain about passing -1 to
> qemuDomainDetachThisHostDevice(), but the function is question

s/is/in/

> has changed since and so the annotation doesn't apply anymore.
> 
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
>  src/qemu/qemu_hotplug.c | 1 -
>  1 file changed, 1 deletion(-)

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list