On Thu, Nov 28, 2024 at 16:28:07 +0300, Alexander Kuznetsov wrote:
This function return value is invariant since 18f3771, so change
its type and remove all dependent checks.
Found by Linux Verification Center (
linuxtesting.org) with Svace.
Reported-by: Pavel Nekrasov <p.nekrasov(a)fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam(a)altlinux.org>
---
src/hypervisor/virhostdev.c | 6 ++----
src/util/virpci.c | 4 +---
src/util/virpci.h | 2 +-
3 files changed, 4 insertions(+), 8 deletions(-)
...
diff --git a/src/util/virpci.h b/src/util/virpci.h
index ba5e0ae6f1..c5dcf9d37f 100644
--- a/src/util/virpci.h
+++ b/src/util/virpci.h
@@ -136,7 +136,7 @@ void virPCIDeviceSetStubDriverName(virPCIDevice *dev,
const char *driverName);
const char *virPCIDeviceGetStubDriverName(virPCIDevice *dev);
virPCIDeviceAddress *virPCIDeviceGetAddress(virPCIDevice *dev);
-int virPCIDeviceSetUsedBy(virPCIDevice *dev,
+void virPCIDeviceSetUsedBy(virPCIDevice *dev,
const char *drv_name,
const char *dom_name);
Indentation error in the two lines above. "void" is one character longes
then "int".
Jirka