diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-04-28 17:23:47 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-04-28 17:23:47 +0200 |
commit | ecbe577be320a19ae3e3672c2f9072c55d53fa29 (patch) | |
tree | b2534b16610ba55fd551ce3450f916aa161adb84 /libssh | |
parent | 84db436e3bc51cc962b8c34a6b54918df3762844 (diff) | |
download | libssh-ecbe577be320a19ae3e3672c2f9072c55d53fa29.tar.gz libssh-ecbe577be320a19ae3e3672c2f9072c55d53fa29.tar.xz libssh-ecbe577be320a19ae3e3672c2f9072c55d53fa29.zip |
Fixed warnings with clang
Diffstat (limited to 'libssh')
-rw-r--r-- | libssh/connect.c | 2 | ||||
-rw-r--r-- | libssh/socket.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libssh/connect.c b/libssh/connect.c index d376738..b7d9a72 100644 --- a/libssh/connect.c +++ b/libssh/connect.c @@ -184,7 +184,7 @@ static int getai(ssh_session session, const char *host, int port, struct addrinf if (port == 0) { hints.ai_flags = AI_PASSIVE; } else { - snprintf(s_port, sizeof(s_port), "%hu", port); + snprintf(s_port, sizeof(s_port), "%hu", (unsigned short)port); service = s_port; #ifdef AI_NUMERICSERV hints.ai_flags=AI_NUMERICSERV; diff --git a/libssh/socket.c b/libssh/socket.c index f915b6b..3e80b89 100644 --- a/libssh/socket.c +++ b/libssh/socket.c @@ -577,7 +577,7 @@ int ssh_socket_wait_for_data(ssh_socket s, ssh_session session, uint32_t len) { if (ssh_socket_is_open(session->socket)) { r = ssh_socket_unbuffered_read(session->socket, buffer, sizeof(buffer)); } else { - r =- 1; + r = -1; } if (r <= 0) { |