]> granicus.if.org Git - curl/commitdiff
made the Curl_he2ai() take the port number as an int intead, to avoid lots
authorDaniel Stenberg <daniel@haxx.se>
Thu, 24 Jun 2004 10:43:50 +0000 (10:43 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 24 Jun 2004 10:43:50 +0000 (10:43 +0000)
of typecasts all over

lib/hostip.c
lib/hostip.h
lib/hostip4.c
lib/hostthre.c

index 6c5e56788561720fd44f7c9ef7adc132974efa40..7a32d1728ed66c98b7ed2243dc2c25698d46ce17 100644 (file)
@@ -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 */
index aa3aba05f7952cb0459bff3b8968934d4bbd51ff..9eb1bf05502a88917186b36c6d7e53b4a969f3a1 100644 (file)
@@ -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);
index b742dfa1066f14f76473a06e6c9fc40eb49ce216..cdc01a47c7a7031b54af022af742267460c14924 100644 (file)
@@ -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;
index a13159f5f8e71339badc8d876e7087a85adf8bf3..be8ab20a8d9dd22efbbd55759fc6e25edc463e92 100644 (file)
@@ -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 */