aboutsummaryrefslogtreecommitdiff
path: root/src/getpass.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2011-01-26 21:49:58 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2011-01-26 21:49:58 +0100
commit00d68d63fa2859fddae415f5f30201f6e65154e8 (patch)
tree9017caeb4bd7030f56b74209e840f0a2c1fc7d01 /src/getpass.c
parent5d87ca94a8abd36fddac0b7c0601953d7aecf92f (diff)
downloadlibssh-00d68d63fa2859fddae415f5f30201f6e65154e8.tar.gz
libssh-00d68d63fa2859fddae415f5f30201f6e65154e8.tar.xz
libssh-00d68d63fa2859fddae415f5f30201f6e65154e8.zip
Getpass: fixed loop + indentation
Diffstat (limited to 'src/getpass.c')
-rw-r--r--src/getpass.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/getpass.c b/src/getpass.c
index 50c9bab6..eaf8029c 100644
--- a/src/getpass.c
+++ b/src/getpass.c
@@ -60,7 +60,7 @@ static int ssh_gets(const char *prompt, char *buf, size_t len, int verify) {
fprintf(stdout, "%s", prompt);
}
fflush(stdout);
- while (fgets(tmp, len, stdin) != NULL);
+ fgets(tmp, len, stdin);
if ((ptr = strchr(tmp, '\n'))) {
*ptr = '\0';
@@ -78,7 +78,7 @@ static int ssh_gets(const char *prompt, char *buf, size_t len, int verify) {
if (key_string == NULL) {
break;
}
- memset(key_string, '\0', len);
+ memset(key_string, '\0', len);
fprintf(stdout, "\nVerifying, please re-enter. %s", prompt);
fflush(stdout);
@@ -260,7 +260,7 @@ int ssh_getpass(const char *prompt,
if (!ok) {
memset (buf, '\0', len);
- return -1;
+ return -1;
}
/* force termination */