aboutsummaryrefslogtreecommitdiff
path: root/lib/hostip4.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-02-05 04:10:32 +0000
committerYang Tse <yangsita@gmail.com>2007-02-05 04:10:32 +0000
commitbc2183b4401d4b6baa28b829fc94a48d35a2ffd1 (patch)
tree5a88d56d8884d25e503e50af93ee60e82295cf02 /lib/hostip4.c
parent01c4fba15c0a90e7ba809eb95e5211e339413237 (diff)
compiler warning fix
Diffstat (limited to 'lib/hostip4.c')
-rw-r--r--lib/hostip4.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/hostip4.c b/lib/hostip4.c
index c4c6256d1..685156bad 100644
--- a/lib/hostip4.c
+++ b/lib/hostip4.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -125,7 +125,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
int *waitp)
{
#if defined(HAVE_GETHOSTBYNAME_R_3) || defined(HAVE_GETHOSTBYNAME_R_6)
- int res = ERANGE;
+ int res;
#endif
Curl_addrinfo *ai = NULL;
struct hostent *h = NULL;
@@ -380,7 +380,7 @@ Curl_addrinfo *Curl_he2ai(const struct hostent *he, int port)
addr = (struct sockaddr_in *)ai->ai_addr; /* storage area for this info */
memcpy((char *)&(addr->sin_addr), curr, sizeof(struct in_addr));
- addr->sin_family = he->h_addrtype;
+ addr->sin_family = (unsigned short)(he->h_addrtype);
addr->sin_port = htons((unsigned short)port);
prevai = ai;