Commit badca647 authored by Per Cederqvist's avatar Per Cederqvist

Fixed a type mismatch in adns.

* src/libraries/adns/src/event.c (adns_processreadable):
udpaddrlen should be a socklen_t, not int.
parent 687a0f8e
2006-01-02 Per Cederqvist <ceder@lysator.liu.se>
Fixed a type mismatch in adns.
* src/libraries/adns/src/event.c (adns_processreadable):
udpaddrlen should be a socklen_t, not int.
Xenofarm warning fixes.
* src/libraries/adns/src/check.c: Include <stdlib.h>, which is
needed since abort() is used here.
......
......@@ -327,7 +327,8 @@ int adns__pollfds(adns_state ads, struct pollfd pollfds_buf[MAX_POLLFDS]) {
}
int adns_processreadable(adns_state ads, int fd, const struct timeval *now) {
int want, dgramlen, r, udpaddrlen, serv, old_skip;
int want, dgramlen, r, serv, old_skip;
socklen_t udpaddrlen;
byte udpbuf[DNS_MAXUDP];
struct sockaddr_in udpaddr;
......@@ -394,8 +395,8 @@ int adns_processreadable(adns_state ads, int fd, const struct timeval *now) {
r= 0; goto xit;
}
if (udpaddrlen != sizeof(udpaddr)) {
adns__diag(ads,-1,0,"datagram received with wrong address length %d"
" (expected %lu)", udpaddrlen,
adns__diag(ads,-1,0,"datagram received with wrong address length %lu"
" (expected %lu)", (unsigned long)udpaddrlen,
(unsigned long)sizeof(udpaddr));
continue;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment