summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2014-09-29 10:37:37 -0400
committerEdward Thomson <ethomson@edwardthomson.com>2014-09-29 10:37:37 -0400
commitffe34a7cdc413d5ee92eea9de0e98d0cf8f91e3e (patch)
tree0676694e258be8691f9fe7189f2a92650b9188a2
parentced843f417d882aa212317c722d5fed1502585b7 (diff)
parentd0cf1040c703c7131c7c70d9de6bc2dd78b25d57 (diff)
downloadlibgit2-ffe34a7cdc413d5ee92eea9de0e98d0cf8f91e3e.tar.gz
Merge pull request #2582 from swansontec/master
Correctly handle getaddrinfo return result
-rw-r--r--src/netops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/netops.c b/src/netops.c
index 43b8c5311..adbae61c4 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;