Commit ffe34a7cdc413d5ee92eea9de0e98d0cf8f91e3e

Edward Thomson 2014-09-29T10:37:37

Merge pull request #2582 from swansontec/master Correctly handle getaddrinfo return result

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/netops.c b/src/netops.c
index 43b8c53..adbae61 100644
--- a/src/netops.c
+++ b/src/netops.c
@@ -458,7 +458,7 @@ int gitno_connect(gitno_socket *s_out, const char *host, const char *port, int f
 	hints.ai_socktype = SOCK_STREAM;
 	hints.ai_family = AF_UNSPEC;
 
-	if ((ret = p_getaddrinfo(host, port, &hints, &info)) < 0) {
+	if ((ret = p_getaddrinfo(host, port, &hints, &info)) != 0) {
 		giterr_set(GITERR_NET,
 			"Failed to resolve address for %s: %s", host, p_gai_strerror(ret));
 		return -1;