aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2012-12-03 13:08:17 +0100
committerAndreas Schneider <asn@cryptomilk.org>2012-12-03 13:08:17 +0100
commitc6fc69fbddae87454b2c5449a229e8f4cd802e51 (patch)
tree46f16682da37dbf4c77f27e3182fb62f62731a5d /src
parentab8c7de6f8946f24d66f7d187aef191a9efef1fd (diff)
downloadlibssh-c6fc69fbddae87454b2c5449a229e8f4cd802e51.tar.gz
libssh-c6fc69fbddae87454b2c5449a229e8f4cd802e51.tar.xz
libssh-c6fc69fbddae87454b2c5449a229e8f4cd802e51.zip
BUG 97: Remove obsolete hsterror().
This function is pretty much obsolete on most platforms. The standard errno should be used. If it is not enough on Windows we should use WSAGetLastError() in future.
Diffstat (limited to 'src')
-rw-r--r--src/bind.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/bind.c b/src/bind.c
index 59ebc1e8..add5a702 100644
--- a/src/bind.c
+++ b/src/bind.c
@@ -61,17 +61,6 @@
#define SOCKOPT_TYPE_ARG4 char
-/*
- * We need to provide hstrerror. Not we can't call the parameter h_errno
- * because it's #defined
- */
-static char *hstrerror(int h_errno_val) {
- static char text[50] = {0};
-
- snprintf(text, sizeof(text), "getaddrino error %d\n", h_errno_val);
-
- return text;
-}
#else /* _WIN32 */
#include <sys/socket.h>
@@ -118,7 +107,7 @@ static socket_t bind_socket(ssh_bind sshbind, const char *hostname,
ssh_set_error(sshbind,
SSH_FATAL,
"Setting socket options failed: %s",
- hstrerror(h_errno));
+ strerror(errno));
freeaddrinfo (ai);
close(s);
return -1;