aboutsummaryrefslogtreecommitdiff
path: root/src/inet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/inet.c')
-rw-r--r--src/inet.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/inet.c b/src/inet.c
index 32f0cd2..862288c 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -213,7 +213,7 @@ const char *inet_tryconnect(p_socket ps, const char *address,
213 memset(&remote, 0, sizeof(remote)); 213 memset(&remote, 0, sizeof(remote));
214 remote.sin_family = AF_INET; 214 remote.sin_family = AF_INET;
215 remote.sin_port = htons(port); 215 remote.sin_port = htons(port);
216 if (strcmp(address, "*")) { 216 if (strcmp(address, "*")) {
217 if (!inet_aton(address, &remote.sin_addr)) { 217 if (!inet_aton(address, &remote.sin_addr)) {
218 struct hostent *hp = NULL; 218 struct hostent *hp = NULL;
219 struct in_addr **addr; 219 struct in_addr **addr;
@@ -248,7 +248,6 @@ const char *inet_trybind(p_socket ps, const char *address, unsigned short port)
248 memcpy(&local.sin_addr, *addr, sizeof(struct in_addr)); 248 memcpy(&local.sin_addr, *addr, sizeof(struct in_addr));
249 } 249 }
250 err = socket_bind(ps, (SA *) &local, sizeof(local)); 250 err = socket_bind(ps, (SA *) &local, sizeof(local));
251 if (err != IO_DONE) socket_destroy(ps);
252 return socket_strerror(err); 251 return socket_strerror(err);
253} 252}
254 253