From 4bec7f09f8b1facd125e4897bb80bcf931adbe79 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 2 Apr 2019 10:07:58 +0200 Subject: [PATCH] tty-ask-password: drop redundant local variable --- src/tty-ask-password-agent/tty-ask-password-agent.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c index d4ce904f3fb..4e31eb8b6cf 100644 --- a/src/tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -701,7 +701,6 @@ static int ask_on_this_console(const char *tty, pid_t *ret_pid, char *argv[]) { .sa_handler = nop_signal_handler, .sa_flags = SA_NOCLDSTOP | SA_RESTART, }; - pid_t pid; int r; arguments = strv_copy(argv); @@ -716,7 +715,7 @@ static int ask_on_this_console(const char *tty, pid_t *ret_pid, char *argv[]) { sig.sa_handler = SIG_DFL; assert_se(sigaction(SIGHUP, &sig, NULL) >= 0); - r = safe_fork("(sd-passwd)", FORK_RESET_SIGNALS|FORK_LOG, &pid); + r = safe_fork("(sd-passwd)", FORK_RESET_SIGNALS|FORK_LOG, ret_pid); if (r < 0) return r; if (r == 0) { @@ -743,7 +742,6 @@ static int ask_on_this_console(const char *tty, pid_t *ret_pid, char *argv[]) { _exit(EXIT_FAILURE); } - *ret_pid = pid; return 0; } -- 2.39.2