From 66de563482c0fd4324e1eae19809d2499e3c4fa8 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 10 Mar 2017 14:28:37 +0100 Subject: Improve code readbility ... by removing the else branch after a return, break or continue. Closes #1310 --- src/tool_getpass.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/tool_getpass.c') diff --git a/src/tool_getpass.c b/src/tool_getpass.c index 8e3e5fa86..e5e2d6dc1 100644 --- a/src/tool_getpass.c +++ b/src/tool_getpass.c @@ -207,18 +207,16 @@ static bool ttyecho(bool enable, int fd) #endif return TRUE; /* disabled */ } - else { - /* re-enable echo, assumes we disabled it before (and set the structs we - now use to reset the terminal status) */ + /* re-enable echo, assumes we disabled it before (and set the structs we + now use to reset the terminal status) */ #ifdef HAVE_TERMIOS_H - tcsetattr(fd, TCSAFLUSH, &withecho); + tcsetattr(fd, TCSAFLUSH, &withecho); #elif defined(HAVE_TERMIO_H) - ioctl(fd, TCSETA, &withecho); + ioctl(fd, TCSETA, &withecho); #else - return FALSE; /* not enabled */ + return FALSE; /* not enabled */ #endif - return TRUE; /* enabled */ - } + return TRUE; /* enabled */ } char *getpass_r(const char *prompt, /* prompt to display */ -- cgit v1.2.3