diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-10-16 12:11:24 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-10-16 12:11:24 +0000 |
commit | 40811e93f3fdf9342a9295369994012420fac548 (patch) | |
tree | a8d85e094a9c21e10aa250f537c101fc2016a049 /contrib/libs/curl/src/tool_getpass.c | |
parent | 30ebe5357bb143648c6be4d151ecd4944af81ada (diff) | |
parent | 28a0c4a9f297064538a018c512cd9bbd00a1a35d (diff) | |
download | ydb-40811e93f3fdf9342a9295369994012420fac548.tar.gz |
Merge branch 'rightlib' into mergelibs-241016-1210
Diffstat (limited to 'contrib/libs/curl/src/tool_getpass.c')
-rw-r--r-- | contrib/libs/curl/src/tool_getpass.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/libs/curl/src/tool_getpass.c b/contrib/libs/curl/src/tool_getpass.c index 1bc82584d2..b8f0b23c48 100644 --- a/contrib/libs/curl/src/tool_getpass.c +++ b/contrib/libs/curl/src/tool_getpass.c @@ -64,8 +64,8 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen) long sts; short chan; - /* MSK, 23-JAN-2004, iosbdef.h was not in VAX V7.2 or CC 6.4 */ - /* distribution so I created this. May revert back later to */ + /* MSK, 23-JAN-2004, iosbdef.h wasn't in VAX V7.2 or CC 6.4 */ + /* distribution so I created this. May revert back later to */ /* struct _iosb iosb; */ struct _iosb { @@ -115,7 +115,7 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen) } /* since echo is disabled, print a newline */ fputs("\n", tool_stderr); - /* if user did not hit ENTER, terminate buffer */ + /* if user didn't hit ENTER, terminate buffer */ if(i == buflen) buffer[buflen-1] = '\0'; @@ -146,15 +146,15 @@ static bool ttyecho(bool enable, int fd) #ifdef HAVE_TERMIOS_H tcgetattr(fd, &withecho); noecho = withecho; - noecho.c_lflag &= ~(tcflag_t)ECHO; + noecho.c_lflag &= ~ECHO; tcsetattr(fd, TCSANOW, &noecho); #elif defined(HAVE_TERMIO_H) ioctl(fd, TCGETA, &withecho); noecho = withecho; - noecho.c_lflag &= ~(tcflag_t)ECHO; + noecho.c_lflag &= ~ECHO; ioctl(fd, TCSETA, &noecho); #else - /* neither HAVE_TERMIO_H nor HAVE_TERMIOS_H, we cannot disable echo! */ + /* neither HAVE_TERMIO_H nor HAVE_TERMIOS_H, we can't disable echo! */ (void)fd; return FALSE; /* not disabled */ #endif @@ -180,7 +180,7 @@ char *getpass_r(const char *prompt, /* prompt to display */ bool disabled; int fd = open("/dev/tty", O_RDONLY); if(-1 == fd) - fd = STDIN_FILENO; /* use stdin if the tty could not be used */ + fd = STDIN_FILENO; /* use stdin if the tty couldn't be used */ disabled = ttyecho(FALSE, fd); /* disable terminal echo */ |