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
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-04-11 14:58:34 +02:00
parent 1c9fbbab1d
commit c9defc1beb
+3 -3
View File
@@ -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);
}