aboutsummaryrefslogtreecommitdiff
path: root/loginutils/cryptpw.c
diff options
context:
space:
mode:
Diffstat (limited to 'loginutils/cryptpw.c')
-rw-r--r--loginutils/cryptpw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/loginutils/cryptpw.c b/loginutils/cryptpw.c
index 3ca7eda4a..fbb7f0515 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)
;