diff options
-rw-r--r-- | src/or/eventdns.c | 4 | ||||
-rw-r--r-- | src/or/eventdns.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/or/eventdns.c b/src/or/eventdns.c index 0ac47fba61..582dc8b071 100644 --- a/src/or/eventdns.c +++ b/src/or/eventdns.c @@ -1812,10 +1812,10 @@ evdns_server_request_drop(struct evdns_server_request *_req) // exported function int -evdns_server_request_get_requesting_addr(struct evdns_server_request *_req, struct sockaddr *sa, socklen_t addr_len) +evdns_server_request_get_requesting_addr(struct evdns_server_request *_req, struct sockaddr *sa, int addr_len) { struct server_request *req = TO_SERVER_REQUEST(_req); - if (addr_len < req->addrlen) + if (addr_len < (int)req->addrlen) return -1; memcpy(sa, &(req->addr), req->addrlen); return req->addrlen; diff --git a/src/or/eventdns.h b/src/or/eventdns.h index 058b4d1b77..e5d616ade6 100644 --- a/src/or/eventdns.h +++ b/src/or/eventdns.h @@ -324,7 +324,7 @@ int evdns_server_request_add_ptr_reply(struct evdns_server_request *req, struct int evdns_server_request_add_cname_reply(struct evdns_server_request *req, const char *name, const char *cname, int ttl); struct sockaddr; -int evdns_server_request_get_requesting_addr(struct evdns_server_request *req, struct sockaddr *sa, socklen_t addr_len); +int evdns_server_request_get_requesting_addr(struct evdns_server_request *req, struct sockaddr *sa, int addr_len); int evdns_server_request_respond(struct evdns_server_request *req, int err); int evdns_server_request_drop(struct evdns_server_request *req); |