compiler warning fix

This commit is contained in:
Yang Tse 2007-02-03 13:05:28 +00:00
parent 67d2dd62f9
commit 82f52e5a6f
1 changed files with 3 additions and 4 deletions

View File

@ -124,6 +124,9 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
int port,
int *waitp)
{
#if defined(HAVE_GETHOSTBYNAME_R_3) || defined(HAVE_GETHOSTBYNAME_R_6)
int res = ERANGE;
#endif
Curl_addrinfo *ai = NULL;
struct hostent *h = NULL;
in_addr_t in;
@ -134,10 +137,6 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
*waitp = 0; /* don't wait, we act synchronously */
#if defined(HAVE_GETHOSTBYNAME_R_3) || defined(HAVE_GETHOSTBYNAME_R_6)
int res = ERANGE;
#endif
if(1 == Curl_inet_pton(AF_INET, hostname, &in))
/* This is a dotted IP address 123.123.123.123-style */
return Curl_ip2addr(in, hostname, port);