diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2011-02-05 11:13:41 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2011-02-05 15:23:19 +0100 |
commit | 4b07157fc6fab92cbc9ad1919c892462b41a5712 (patch) | |
tree | 447cc038bb17c27d6c910b66e9fd2f43bf76a76d | |
parent | 867944b939383baf28f573ee7ee3ba03805b25eb (diff) | |
download | libssh-4b07157fc6fab92cbc9ad1919c892462b41a5712.tar.gz libssh-4b07157fc6fab92cbc9ad1919c892462b41a5712.tar.xz libssh-4b07157fc6fab92cbc9ad1919c892462b41a5712.zip |
getpass: Fixed a compiler warning.
-rw-r--r-- | src/getpass.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/getpass.c b/src/getpass.c index eaf8029..62f323e 100644 --- a/src/getpass.c +++ b/src/getpass.c @@ -60,7 +60,9 @@ static int ssh_gets(const char *prompt, char *buf, size_t len, int verify) { fprintf(stdout, "%s", prompt); } fflush(stdout); - fgets(tmp, len, stdin); + if (fgets(tmp, len, stdin) == NULL) { + return 0; + } if ((ptr = strchr(tmp, '\n'))) { *ptr = '\0'; |