Loading ares/ares__get_hostent.c +2 −2 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host) int status, linesize, end_at_hostname, naliases; struct in_addr addr; struct in6_addr addr6; int addrlen = sizeof(struct in_addr); size_t addrlen = sizeof(struct in_addr); struct hostent *hostent = NULL; while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS) Loading Loading @@ -162,7 +162,7 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host) hostent->h_aliases[naliases] = NULL; hostent->h_addrtype = family; hostent->h_length = addrlen; hostent->h_length = (int)addrlen; if (family == AF_INET) memcpy(hostent->h_addr_list[0], &addr, addrlen); else if (family == AF_INET6) Loading ares/ares_gethostbyaddr.c +11 −4 Original line number Diff line number Diff line Loading @@ -145,16 +145,23 @@ static void addr_callback(void *arg, int status, int timeouts, { struct addr_query *aquery = (struct addr_query *) arg; struct hostent *host; size_t addrlen; aquery->timeouts += timeouts; if (status == ARES_SUCCESS) { if (aquery->addr.family == AF_INET) { addrlen = sizeof(struct in_addr); status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addrV4, sizeof(struct in_addr), AF_INET, &host); (int)addrlen, AF_INET, &host); } else { addrlen = sizeof(struct in6_addr); status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addrV6, sizeof(struct in6_addr), AF_INET6, &host); (int)addrlen, AF_INET6, &host); } end_aquery(aquery, status, host); } else if (status == ARES_EDESTRUCTION) Loading ares/ares_gethostbyname.c +2 −2 Original line number Diff line number Diff line Loading @@ -275,12 +275,12 @@ static int fake_hostent(const char *name, int family, ares_host_callback callbac if (family == AF_INET) { hostent.h_length = sizeof(struct in_addr); hostent.h_length = (int)sizeof(struct in_addr); addrs[0] = (char *)∈ } else if (family == AF_INET6) { hostent.h_length = sizeof(struct in6_addr); hostent.h_length = (int)sizeof(struct in6_addr); addrs[0] = (char *)&in6; } /* Duplicate the name, to avoid a constness violation. */ Loading ares/ares_process.c +2 −2 Original line number Diff line number Diff line /* $Id$ */ /* Copyright 1998 by the Massachusetts Institute of Technology. * Copyright (C) 2004-2008 by Daniel Stenberg * Copyright (C) 2004-2009 by Daniel Stenberg * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without Loading Loading @@ -104,7 +104,7 @@ static void end_query(ares_channel channel, struct query *query, int status, int ares__timedout(struct timeval *now, struct timeval *check) { int secs = (now->tv_sec - check->tv_sec); long secs = (now->tv_sec - check->tv_sec); if(secs > 0) return 1; /* yes, timed out */ Loading lib/curl_addrinfo.c +2 −2 Original line number Diff line number Diff line Loading @@ -259,7 +259,7 @@ Curl_he2ai(const struct hostent *he, int port) for(i=0; (curr = he->h_addr_list[i]) != NULL; i++) { int ss_size; size_t ss_size; #ifdef ENABLE_IPV6 if (he->h_addrtype == AF_INET6) ss_size = sizeof (struct sockaddr_in6); Loading Loading @@ -297,7 +297,7 @@ Curl_he2ai(const struct hostent *he, int port) the type must be ignored and conn->socktype be used instead! */ ai->ai_socktype = SOCK_STREAM; ai->ai_addrlen = ss_size; ai->ai_addrlen = (int)ss_size; /* leave the rest of the struct filled with zero */ Loading Loading
ares/ares__get_hostent.c +2 −2 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host) int status, linesize, end_at_hostname, naliases; struct in_addr addr; struct in6_addr addr6; int addrlen = sizeof(struct in_addr); size_t addrlen = sizeof(struct in_addr); struct hostent *hostent = NULL; while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS) Loading Loading @@ -162,7 +162,7 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host) hostent->h_aliases[naliases] = NULL; hostent->h_addrtype = family; hostent->h_length = addrlen; hostent->h_length = (int)addrlen; if (family == AF_INET) memcpy(hostent->h_addr_list[0], &addr, addrlen); else if (family == AF_INET6) Loading
ares/ares_gethostbyaddr.c +11 −4 Original line number Diff line number Diff line Loading @@ -145,16 +145,23 @@ static void addr_callback(void *arg, int status, int timeouts, { struct addr_query *aquery = (struct addr_query *) arg; struct hostent *host; size_t addrlen; aquery->timeouts += timeouts; if (status == ARES_SUCCESS) { if (aquery->addr.family == AF_INET) { addrlen = sizeof(struct in_addr); status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addrV4, sizeof(struct in_addr), AF_INET, &host); (int)addrlen, AF_INET, &host); } else { addrlen = sizeof(struct in6_addr); status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addrV6, sizeof(struct in6_addr), AF_INET6, &host); (int)addrlen, AF_INET6, &host); } end_aquery(aquery, status, host); } else if (status == ARES_EDESTRUCTION) Loading
ares/ares_gethostbyname.c +2 −2 Original line number Diff line number Diff line Loading @@ -275,12 +275,12 @@ static int fake_hostent(const char *name, int family, ares_host_callback callbac if (family == AF_INET) { hostent.h_length = sizeof(struct in_addr); hostent.h_length = (int)sizeof(struct in_addr); addrs[0] = (char *)∈ } else if (family == AF_INET6) { hostent.h_length = sizeof(struct in6_addr); hostent.h_length = (int)sizeof(struct in6_addr); addrs[0] = (char *)&in6; } /* Duplicate the name, to avoid a constness violation. */ Loading
ares/ares_process.c +2 −2 Original line number Diff line number Diff line /* $Id$ */ /* Copyright 1998 by the Massachusetts Institute of Technology. * Copyright (C) 2004-2008 by Daniel Stenberg * Copyright (C) 2004-2009 by Daniel Stenberg * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without Loading Loading @@ -104,7 +104,7 @@ static void end_query(ares_channel channel, struct query *query, int status, int ares__timedout(struct timeval *now, struct timeval *check) { int secs = (now->tv_sec - check->tv_sec); long secs = (now->tv_sec - check->tv_sec); if(secs > 0) return 1; /* yes, timed out */ Loading
lib/curl_addrinfo.c +2 −2 Original line number Diff line number Diff line Loading @@ -259,7 +259,7 @@ Curl_he2ai(const struct hostent *he, int port) for(i=0; (curr = he->h_addr_list[i]) != NULL; i++) { int ss_size; size_t ss_size; #ifdef ENABLE_IPV6 if (he->h_addrtype == AF_INET6) ss_size = sizeof (struct sockaddr_in6); Loading Loading @@ -297,7 +297,7 @@ Curl_he2ai(const struct hostent *he, int port) the type must be ignored and conn->socktype be used instead! */ ai->ai_socktype = SOCK_STREAM; ai->ai_addrlen = ss_size; ai->ai_addrlen = (int)ss_size; /* leave the rest of the struct filled with zero */ Loading