From 9cb9b2058d921e2aff32303f94c65141b38b8558 Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 14 Nov 2025 23:04:39 +0100 Subject: [PATCH] Fix identation --- src/readpassphrase.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/readpassphrase.c b/src/readpassphrase.c index 64b4947..313ba27 100644 --- a/src/readpassphrase.c +++ b/src/readpassphrase.c @@ -44,7 +44,7 @@ char *readpassphrase(const char *prompt, char *outBuf, size_t outBufLen, int fla while (current_index < outBufLen - 1) { ch = _getch(); - + if (ch == '\r') { if (_kbhit()) _getch(); /* read linefeed if its there */ break; @@ -129,19 +129,19 @@ restart: nr = -1; save_errno = 0; need_restart = 0; - + /* * 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); - + } + /* * Read and write to /dev/tty if available. If not, read from * stdin and write to stderr unless a tty is required. */ - if ((flags & RPP_STDIN) || - (input = output = open(_PATH_TTY, O_RDWR)) == -1) { + if ((flags & RPP_STDIN) || (input = output = open(_PATH_TTY, O_RDWR)) == -1) { if (flags & RPP_REQUIRE_TTY) { errno = ENOTTY; return(NULL);