aboutsummaryrefslogtreecommitdiff
path: root/src/tool_getpass.c
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre@debian.org>2017-03-10 14:28:37 +0100
committerDaniel Stenberg <daniel@haxx.se>2017-03-13 23:11:45 +0100
commit66de563482c0fd4324e1eae19809d2499e3c4fa8 (patch)
treebf3178878ebe2461388e8fec01e321173ffe30f8 /src/tool_getpass.c
parentdb87bcfcf21f8c3b8188d0c5ab82faf804ffd5ea (diff)
Improve code readbility
... by removing the else branch after a return, break or continue. Closes #1310
Diffstat (limited to 'src/tool_getpass.c')
-rw-r--r--src/tool_getpass.c14
1 files changed, 6 insertions, 8 deletions
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 */