1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-11 20:15:03 -05:00

fix function result checking

This commit is contained in:
Yang Tse 2010-06-08 16:16:34 +02:00
parent b3d7161642
commit cbdd1cbcde

View File

@ -537,7 +537,7 @@ static bool getaddressinfo(struct sockaddr* sa, char* addr,
case AF_INET: case AF_INET:
si = (struct sockaddr_in*) sa; si = (struct sockaddr_in*) sa;
if(Curl_inet_ntop(sa->sa_family, &si->sin_addr, if(Curl_inet_ntop(sa->sa_family, &si->sin_addr,
addr, MAX_IPADR_LEN) != 0) addr, MAX_IPADR_LEN) == NULL)
return FALSE; return FALSE;
us_port = ntohs(si->sin_port); us_port = ntohs(si->sin_port);
*port = us_port; *port = us_port;
@ -546,7 +546,7 @@ static bool getaddressinfo(struct sockaddr* sa, char* addr,
case AF_INET6: case AF_INET6:
si6 = (struct sockaddr_in6*)sa; si6 = (struct sockaddr_in6*)sa;
if(Curl_inet_ntop(sa->sa_family, &si6->sin6_addr, if(Curl_inet_ntop(sa->sa_family, &si6->sin6_addr,
addr, MAX_IPADR_LEN) != 0) addr, MAX_IPADR_LEN) == NULL)
return FALSE; return FALSE;
us_port = ntohs(si6->sin6_port); us_port = ntohs(si6->sin6_port);
*port = us_port; *port = us_port;