From 14eb593af3c41ea439f01d34aaae497d8420f316 Mon Sep 17 00:00:00 2001 From: Ruben Garcia Azuara Date: Tue, 6 Apr 2010 19:39:41 +0200 Subject: Fixed solaris compilation warning and ignore case at host parameter. - Suppress compilation warning in solaris caused by a comma at the end of the last value. - Ignore case at host parameter in config file Signed-off-by: Ruben Garcia Azuara Signed-off-by: Andreas Schneider --- libssh/keyfiles.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'libssh/keyfiles.c') diff --git a/libssh/keyfiles.c b/libssh/keyfiles.c index 663d508..e09de67 100644 --- a/libssh/keyfiles.c +++ b/libssh/keyfiles.c @@ -1230,34 +1230,6 @@ static int alldigits(const char *s) { * @{ */ -/** - * @internal - * - * @brief Lowercase a string. - * - * @param[in] str The string to lowercase. - * - * @return The malloced lowered string or NULL on error. - */ -static char *lowercase(const char* str) { - char *new, *p; - - if (str == NULL) { - return NULL; - } - - new = strdup(str); - if (new == NULL) { - return NULL; - } - - for (p = new; *p; p++) { - *p = tolower(*p); - } - - return new; -} - /** * @internal * @@ -1627,7 +1599,7 @@ int ssh_is_server_known(ssh_session session) { return SSH_SERVER_ERROR; } - host = lowercase(session->host); + host = ssh_lowercase(session->host); if (host == NULL) { ssh_set_error(session, SSH_FATAL, "Not enough space!"); leave_function(); -- cgit