mirror of
https://github.com/systemd/systemd.git
synced 2024-10-30 23:21:22 +03:00
tty-ask-password: drop redundant local variable
This commit is contained in:
parent
ed179fd710
commit
4bec7f09f8
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user