Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/unix/getpass.c')
-rw-r--r--newlib/libc/unix/getpass.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/newlib/libc/unix/getpass.c b/newlib/libc/unix/getpass.c
index ff9e7e67d..b45df074f 100644
--- a/newlib/libc/unix/getpass.c
+++ b/newlib/libc/unix/getpass.c
@@ -70,7 +70,8 @@ getpass (prompt)
*/
omask = sigblock (sigmask (SIGINT) | sigmask (SIGTSTP));
(void) tcgetattr (fileno (fp), &term);
- if (echo = (term.c_lflag & ECHO))
+ echo = (term.c_lflag & ECHO);
+ if (echo)
{
term.c_lflag &= ~ECHO;
(void) tcsetattr (fileno (fp), TCSAFLUSH, &term);