aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-06-24 10:43:50 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-06-24 10:43:50 +0000
commit5e34f3dc0133333fb398dd4b285a63f58aa441da (patch)
tree24ad1f8d707fa14cc663f8e1ec534ef7703b2d2d /lib
parent0031d76f2a77e583528a817bcf7b605052b95893 (diff)
made the Curl_he2ai() take the port number as an int intead, to avoid lots
of typecasts all over
Diffstat (limited to 'lib')
-rw-r--r--lib/hostip.c2
-rw-r--r--lib/hostip.h2
-rw-r--r--lib/hostip4.c2
-rw-r--r--lib/hostthre.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index 6c5e56788..7a32d1728 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -555,6 +555,6 @@ Curl_addrinfo *Curl_addrinfo_copy(void *org, int port)
{
struct hostent *orig = org;
- return Curl_he2ai(orig, (unsigned short)port);
+ return Curl_he2ai(orig, port);
}
#endif /* CURLRES_ADDRINFO_COPY */
diff --git a/lib/hostip.h b/lib/hostip.h
index aa3aba05f..9eb1bf055 100644
--- a/lib/hostip.h
+++ b/lib/hostip.h
@@ -215,7 +215,7 @@ Curl_addrinfo *Curl_ip2addr(in_addr_t num, char *hostname, int port);
/* [ipv4 only] Curl_he2ai() converts a struct hostent to a Curl_addrinfo chain
and returns it */
-Curl_addrinfo *Curl_he2ai(struct hostent *, unsigned short port);
+Curl_addrinfo *Curl_he2ai(struct hostent *, int port);
/* relocate a hostent struct */
void Curl_hostent_relocate(struct hostent *h, long offset);
diff --git a/lib/hostip4.c b/lib/hostip4.c
index b742dfa10..cdc01a47c 100644
--- a/lib/hostip4.c
+++ b/lib/hostip4.c
@@ -404,7 +404,7 @@ struct hostent {
*/
-Curl_addrinfo *Curl_he2ai(struct hostent *he, unsigned short port)
+Curl_addrinfo *Curl_he2ai(struct hostent *he, int port)
{
Curl_addrinfo *ai;
Curl_addrinfo *prevai = NULL;
diff --git a/lib/hostthre.c b/lib/hostthre.c
index a13159f5f..be8ab20a8 100644
--- a/lib/hostthre.c
+++ b/lib/hostthre.c
@@ -469,7 +469,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
hostname, port, Curl_strerror(conn,WSAGetLastError()));
return NULL;
}
- return Curl_he2ai(h, (unsigned short)port);
+ return Curl_he2ai(h, port);
}
#endif /* CURLRES_IPV4 */