From: Zbigniew Jędrzejewski-Szmek Date: Sat, 11 Apr 2026 10:44:03 +0000 (+0200) Subject: varlinkctl: drop bogus variable assignment X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c9defc1bebe203ab0ccf7a4a58b56360a2e0cc21;p=thirdparty%2Fsystemd.git 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 --- diff --git a/src/varlinkctl/varlinkctl.c b/src/varlinkctl/varlinkctl.c index 18a639962c1..f2f8c271d47 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); }