aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-06-08 16:16:34 +0200
committerYang Tse <yangsita@gmail.com>2010-06-08 16:16:34 +0200
commitcbdd1cbcdee97b39a5940b61ba96ee32800f524f (patch)
treeb78de1b12dfd2671e34bd26a3c06c0c2de0f7abe /lib
parentb3d7161642ae1af0697ed9c30efbe36eed4da7f9 (diff)
fix function result checking
Diffstat (limited to 'lib')
-rw-r--r--lib/connect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 51d117389..3ca6aa3ce 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -537,7 +537,7 @@ static bool getaddressinfo(struct sockaddr* sa, char* addr,
case AF_INET:
si = (struct sockaddr_in*) sa;
if(Curl_inet_ntop(sa->sa_family, &si->sin_addr,
- addr, MAX_IPADR_LEN) != 0)
+ addr, MAX_IPADR_LEN) == NULL)
return FALSE;
us_port = ntohs(si->sin_port);
*port = us_port;
@@ -546,7 +546,7 @@ static bool getaddressinfo(struct sockaddr* sa, char* addr,
case AF_INET6:
si6 = (struct sockaddr_in6*)sa;
if(Curl_inet_ntop(sa->sa_family, &si6->sin6_addr,
- addr, MAX_IPADR_LEN) != 0)
+ addr, MAX_IPADR_LEN) == NULL)
return FALSE;
us_port = ntohs(si6->sin6_port);
*port = us_port;