From c9defc1bebe203ab0ccf7a4a58b56360a2e0cc21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 11 Apr 2026 12:44:03 +0200 Subject: [PATCH] varlinkctl: drop bogus variable assignment Coverity complains that r is overridden. In fact it isn't, but we shouldn't set it like this anyway. exec_with_listen_fds() already logs, so we only need to call _exit() if it fails. CID#1646716 --- src/varlinkctl/varlinkctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/varlinkctl/varlinkctl.c b/src/varlinkctl/varlinkctl.c index 18a639962c..f2f8c271d4 100644 --- a/src/varlinkctl/varlinkctl.c +++ b/src/varlinkctl/varlinkctl.c @@ -700,8 +700,8 @@ static int varlink_call_and_upgrade(const char *url, const char *method, sd_json _exit(EXIT_FAILURE); } - r = exec_with_listen_fds(exec_cmdline, /* fds= */ NULL, /* n_fds= */ 0); - /* This is only reached on failure, otherwise we continue with exec_cmldine). */ + (void) exec_with_listen_fds(exec_cmdline, /* fds= */ NULL, /* n_fds= */ 0); + /* This is only reached on failure, otherwise we continue with exec_cmdline). */ _exit(EXIT_FAILURE); } @@ -993,7 +993,7 @@ static int verb_call(int argc, char *argv[], uintptr_t _data, void *userdata) { _exit(EXIT_FAILURE); } - exec_with_listen_fds(exec_cmdline, fd_array, m); + (void) exec_with_listen_fds(exec_cmdline, fd_array, m); /* This is only reached on failure, otherwise we continue with exec_cmdline. */ _exit(EXIT_FAILURE); }