diff options
author | Denys Vlasenko | 2018-04-07 15:50:30 +0200 |
---|---|---|
committer | Denys Vlasenko | 2018-04-07 15:50:30 +0200 |
commit | 17058a06c4333fc0c492c168c8a971ebd0fd5a5a (patch) | |
tree | a32133b2e5c18be65796283177551f9bcd7e49bb /loginutils/cryptpw.c | |
parent | bae8fc4436f9aeb43ef0aaccd1c9b1b35b5a4617 (diff) | |
download | busybox-17058a06c4333fc0c492c168c8a971ebd0fd5a5a.zip busybox-17058a06c4333fc0c492c168c8a971ebd0fd5a5a.tar.gz |
libbb: switch bb_ask_noecho() to "mallocing" string return API
function old new delta
bb_ask_noecho 313 330 +17
get_cred_or_die 125 115 -10
passwd_main 995 958 -37
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 17/-47) Total: -30 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'loginutils/cryptpw.c')
-rw-r--r-- | loginutils/cryptpw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/loginutils/cryptpw.c b/loginutils/cryptpw.c index 3ca7eda..fbb7f05 100644 --- a/loginutils/cryptpw.c +++ b/loginutils/cryptpw.c @@ -133,7 +133,7 @@ int cryptpw_main(int argc UNUSED_PARAM, char **argv) if (!password) { /* Only mkpasswd, and only from tty, prompts. * Otherwise it is a plain read. */ - password = (ENABLE_MKPASSWD && isatty(STDIN_FILENO) && applet_name[0] == 'm') + password = (ENABLE_MKPASSWD && applet_name[0] == 'm' && isatty(STDIN_FILENO)) ? bb_ask_noecho_stdin("Password: ") : xmalloc_fgetline(stdin) ; |