From 6c2e4c3856c8ed48c378bf1bf357cab46271a47a Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Tue, 22 Jan 2013 09:41:01 -0500 Subject: [PATCH] qemu: Add coverity[negative_returns] tag This avoids "Event negative_returns: A negative constant "-1" is passed as an argument to a parameter that cannot be negative.". The called function uses -1 to determine whether it needs to traverse all the hostdevs. --- src/qemu/qemu_hotplug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 19172e1255..8103183386 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2539,6 +2539,7 @@ 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), -1); -- 2.39.5