diff options
author | 2000-11-29 18:41:12 +0000 | |
---|---|---|
committer | 2000-11-29 18:41:12 +0000 | |
commit | 5a265e84dcefd79493d9fe6f3e2828912c7dc74d (patch) | |
tree | fee24b90f2babb904cd4500d33ed09ab5fbcd9ba | |
parent | note ICH2 support (diff) | |
download | wireguard-openbsd-5a265e84dcefd79493d9fe6f3e2828912c7dc74d.tar.xz wireguard-openbsd-5a265e84dcefd79493d9fe6f3e2828912c7dc74d.zip |
Don't print an extra newline after reading passphrase if echo was not
turned off since we already printed one from the user.
-rw-r--r-- | lib/libc/gen/readpassphrase.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/readpassphrase.c b/lib/libc/gen/readpassphrase.c index 8804dd4e8ad..c77758e85ee 100644 --- a/lib/libc/gen/readpassphrase.c +++ b/lib/libc/gen/readpassphrase.c @@ -26,7 +26,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: readpassphrase.c,v 1.1 2000/11/21 00:48:37 millert Exp $"; +static char rcsid[] = "$OpenBSD: readpassphrase.c,v 1.2 2000/11/29 18:41:12 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <ctype.h> @@ -107,8 +107,8 @@ readpassphrase(prompt, buf, bufsiz, flags) } } *p = '\0'; - (void)write(output, "\n", 1); if (echo) { + (void)write(output, "\n", 1); term.c_lflag |= ECHO; (void)tcsetattr(input, TCSAFLUSH|TCSASOFT, &term); } |