Fix identation

This commit is contained in:
ben
2025-11-14 23:04:39 +01:00
parent 7ecdc0bb91
commit 9cb9b2058d

View File

@@ -44,7 +44,7 @@ char *readpassphrase(const char *prompt, char *outBuf, size_t outBufLen, int fla
while (current_index < outBufLen - 1) { while (current_index < outBufLen - 1) {
ch = _getch(); ch = _getch();
if (ch == '\r') { if (ch == '\r') {
if (_kbhit()) _getch(); /* read linefeed if its there */ if (_kbhit()) _getch(); /* read linefeed if its there */
break; break;
@@ -129,19 +129,19 @@ restart:
nr = -1; nr = -1;
save_errno = 0; save_errno = 0;
need_restart = 0; need_restart = 0;
/* /*
* Fix strange behaviour: a file must be open to prevent echo * Fix strange behaviour: a file must be open to prevent echo
*/ */
if (!(flags & RPP_ECHO_ON)) if (!(flags & RPP_ECHO_ON)) {
open(_PATH_TTY, O_RDONLY); open(_PATH_TTY, O_RDONLY);
}
/* /*
* Read and write to /dev/tty if available. If not, read from * Read and write to /dev/tty if available. If not, read from
* stdin and write to stderr unless a tty is required. * stdin and write to stderr unless a tty is required.
*/ */
if ((flags & RPP_STDIN) || if ((flags & RPP_STDIN) || (input = output = open(_PATH_TTY, O_RDWR)) == -1) {
(input = output = open(_PATH_TTY, O_RDWR)) == -1) {
if (flags & RPP_REQUIRE_TTY) { if (flags & RPP_REQUIRE_TTY) {
errno = ENOTTY; errno = ENOTTY;
return(NULL); return(NULL);