On Thu, Nov 28, 2024 at 18:21:19 +0300, Alexander Kuznetsov wrote:
This function return value is invariant since VIR_EXPAND_N check
removal in 7d2fd6e, 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/admin/admin_remote.c | 3 +--
src/locking/lock_driver_lockd.c | 3 +--
src/logging/log_manager.c | 3 +--
src/lxc/lxc_monitor.c | 4 +---
src/remote/remote_driver.c | 7 +++----
src/rpc/virnetclient.c | 3 +--
src/rpc/virnetclient.h | 2 +-
7 files changed, 9 insertions(+), 16 deletions(-)
...
diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c
index 6d424eb599..f0d30b63ba 100644
--- a/src/rpc/virnetclient.c
+++ b/src/rpc/virnetclient.c
@@ -1053,7 +1053,7 @@ bool virNetClientIsOpen(virNetClient *client)
}
-int virNetClientAddProgram(virNetClient *client,
+void virNetClientAddProgram(virNetClient *client,
virNetClientProgram *prog)
Indentation.
{
virObjectLock(client);
@@ -1062,7 +1062,6 @@ int virNetClientAddProgram(virNetClient *client,
client->programs[client->nprograms-1] = virObjectRef(prog);
virObjectUnlock(client);
- return 0;
}
diff --git a/src/rpc/virnetclient.h b/src/rpc/virnetclient.h
index 1647a6cc71..7726b57ef4 100644
--- a/src/rpc/virnetclient.h
+++ b/src/rpc/virnetclient.h
@@ -117,7 +117,7 @@ int virNetClientDupFD(virNetClient *client, bool cloexec);
bool virNetClientHasPassFD(virNetClient *client);
-int virNetClientAddProgram(virNetClient *client,
+void virNetClientAddProgram(virNetClient *client,
virNetClientProgram *prog);
Indentation.
Reviewed-by: Jiri Denemark <jdenemar(a)redhat.com>