summaryrefslogtreecommitdiff
path: root/lib/hostip4.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-02-03 13:05:28 +0000
committerYang Tse <yangsita@gmail.com>2007-02-03 13:05:28 +0000
commit82f52e5a6fe7449184b6ce9dc4d61b4a3acec208 (patch)
tree3097e625e4d5163731213a56f5c36c0fcaa88d56 /lib/hostip4.c
parent67d2dd62f93b0eddebe75e96045b115a2f569b29 (diff)
downloadcurl-82f52e5a6fe7449184b6ce9dc4d61b4a3acec208.tar.gz
compiler warning fix
Diffstat (limited to 'lib/hostip4.c')
-rw-r--r--lib/hostip4.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/hostip4.c b/lib/hostip4.c
index 273703de5..c4c6256d1 100644
--- a/lib/hostip4.c
+++ b/lib/hostip4.c
@@ -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);