mirror of
https://github.com/curl/curl.git
synced 2025-02-17 14:59:45 +08:00
made the Curl_he2ai() take the port number as an int intead, to avoid lots
of typecasts all over
This commit is contained in:
parent
0031d76f2a
commit
5e34f3dc01
@ -555,6 +555,6 @@ Curl_addrinfo *Curl_addrinfo_copy(void *org, int port)
|
|||||||
{
|
{
|
||||||
struct hostent *orig = org;
|
struct hostent *orig = org;
|
||||||
|
|
||||||
return Curl_he2ai(orig, (unsigned short)port);
|
return Curl_he2ai(orig, port);
|
||||||
}
|
}
|
||||||
#endif /* CURLRES_ADDRINFO_COPY */
|
#endif /* CURLRES_ADDRINFO_COPY */
|
||||||
|
@ -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
|
/* [ipv4 only] Curl_he2ai() converts a struct hostent to a Curl_addrinfo chain
|
||||||
and returns it */
|
and returns it */
|
||||||
Curl_addrinfo *Curl_he2ai(struct hostent *, unsigned short port);
|
Curl_addrinfo *Curl_he2ai(struct hostent *, int port);
|
||||||
|
|
||||||
/* relocate a hostent struct */
|
/* relocate a hostent struct */
|
||||||
void Curl_hostent_relocate(struct hostent *h, long offset);
|
void Curl_hostent_relocate(struct hostent *h, long offset);
|
||||||
|
@ -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 *ai;
|
||||||
Curl_addrinfo *prevai = NULL;
|
Curl_addrinfo *prevai = NULL;
|
||||||
|
@ -469,7 +469,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
|
|||||||
hostname, port, Curl_strerror(conn,WSAGetLastError()));
|
hostname, port, Curl_strerror(conn,WSAGetLastError()));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return Curl_he2ai(h, (unsigned short)port);
|
return Curl_he2ai(h, port);
|
||||||
}
|
}
|
||||||
#endif /* CURLRES_IPV4 */
|
#endif /* CURLRES_IPV4 */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user