1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-28 01:41:48 +03:00

Fix warnings found with clang analyzer

This commit is contained in:
Aris Adamantiadis
2010-04-28 19:36:39 +02:00
parent 20e7ec96ae
commit 7d32ec5d28
5 changed files with 26 additions and 7 deletions

View File

@ -53,7 +53,7 @@ static int auth_callback(const char *prompt, char *buf, size_t len,
if (echo) {
while ((answer = fgets(buf, len, stdin)) == NULL);
if ((ptr = strchr(buf, '\n'))) {
ptr = '\0';
*ptr = '\0';
}
} else {
answer = getpass(prompt);