diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-02-23 07:52:20 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-02-23 07:52:20 +0000 |
commit | c7fe8a7a11456abe367d3d815f3c2faf62900fc3 (patch) | |
tree | 0129ec768d659346b27655f3c6b272d2604a2177 | |
parent | 7174ca7a20dd18f4b42f9b37f4260865365b71d2 (diff) |
make ares_expand_name() take a long * instead of an int *, since we do
pointer arithmetic (ptr1 - ptr2) and to do that properly on 64bit we need
long
-rw-r--r-- | ares/adig.c | 6 | ||||
-rw-r--r-- | ares/ares.h | 2 | ||||
-rw-r--r-- | ares/ares_expand_name.c | 2 | ||||
-rw-r--r-- | ares/ares_parse_a_reply.c | 3 | ||||
-rw-r--r-- | ares/ares_parse_ptr_reply.c | 3 | ||||
-rw-r--r-- | ares/ares_process.c | 2 |
6 files changed, 11 insertions, 7 deletions
diff --git a/ares/adig.c b/ares/adig.c index 0513d2fd7..2208d9a23 100644 --- a/ares/adig.c +++ b/ares/adig.c @@ -370,7 +370,8 @@ static const unsigned char *display_question(const unsigned char *aptr, int alen) { char *name; - int type, dnsclass, status, len; + int type, dnsclass, status; + long len; /* Parse the question name. */ status = ares_expand_name(aptr, abuf, alen, &name, &len); @@ -408,7 +409,8 @@ static const unsigned char *display_rr(const unsigned char *aptr, { const unsigned char *p; char *name; - int type, dnsclass, ttl, dlen, status, len; + int type, dnsclass, ttl, dlen, status; + long len; struct in_addr addr; /* Parse the RR name. */ diff --git a/ares/ares.h b/ares/ares.h index 7ff256c8f..c8f708edc 100644 --- a/ares/ares.h +++ b/ares/ares.h @@ -117,7 +117,7 @@ void ares_process(ares_channel channel, fd_set *read_fds, fd_set *write_fds); int ares_mkquery(const char *name, int dnsclass, int type, unsigned short id, int rd, unsigned char **buf, int *buflen); int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf, - int alen, char **s, int *enclen); + int alen, char **s, long *enclen); int ares_parse_a_reply(const unsigned char *abuf, int alen, struct hostent **host); int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr, diff --git a/ares/ares_expand_name.c b/ares/ares_expand_name.c index b242abf0f..457f4da05 100644 --- a/ares/ares_expand_name.c +++ b/ares/ares_expand_name.c @@ -54,7 +54,7 @@ static int name_length(const unsigned char *encoded, const unsigned char *abuf, */ int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf, - int alen, char **s, int *enclen) + int alen, char **s, long *enclen) { int len, indir = 0; char *q; diff --git a/ares/ares_parse_a_reply.c b/ares/ares_parse_a_reply.c index 1c18b56a9..6c7e19332 100644 --- a/ares/ares_parse_a_reply.c +++ b/ares/ares_parse_a_reply.c @@ -35,8 +35,9 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen, struct hostent **host) { unsigned int qdcount, ancount; - int status, i, len, rr_type, rr_class, rr_len, naddrs; + int status, i, rr_type, rr_class, rr_len, naddrs; int naliases; + long len; const unsigned char *aptr; char *hostname, *rr_name, *rr_data, **aliases; struct in_addr *addrs; diff --git a/ares/ares_parse_ptr_reply.c b/ares/ares_parse_ptr_reply.c index 13b3ab03b..0651a1e20 100644 --- a/ares/ares_parse_ptr_reply.c +++ b/ares/ares_parse_ptr_reply.c @@ -34,7 +34,8 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr, int addrlen, int family, struct hostent **host) { unsigned int qdcount, ancount; - int status, i, len, rr_type, rr_class, rr_len; + int status, i, rr_type, rr_class, rr_len; + long len; const unsigned char *aptr; char *ptrname, *hostname, *rr_name, *rr_data; struct hostent *hostent; diff --git a/ares/ares_process.c b/ares/ares_process.c index b381757b7..b2661f730 100644 --- a/ares/ares_process.c +++ b/ares/ares_process.c @@ -525,7 +525,7 @@ static int same_questions(const unsigned char *qbuf, int qlen, const unsigned char *p; int qdcount; char *name; - int namelen; + long namelen; int type; int dnsclass; } q, a; |