[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r10347: socklen_t is a silly type anyway. Just use int as the argume (in tor/trunk: . src/or)



Author: nickm
Date: 2007-05-25 20:15:58 -0400 (Fri, 25 May 2007)
New Revision: 10347

Modified:
   tor/trunk/
   tor/trunk/src/or/eventdns.c
   tor/trunk/src/or/eventdns.h
Log:
 r12988@catbus:  nickm | 2007-05-25 20:15:56 -0400
 socklen_t is a silly type anyway. Just use int as the argument for evdns_server_request_get_requesting_addr.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r12988] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/or/eventdns.c
===================================================================
--- tor/trunk/src/or/eventdns.c	2007-05-26 00:07:48 UTC (rev 10346)
+++ tor/trunk/src/or/eventdns.c	2007-05-26 00:15:58 UTC (rev 10347)
@@ -1812,10 +1812,10 @@
 
 // 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;

Modified: tor/trunk/src/or/eventdns.h
===================================================================
--- tor/trunk/src/or/eventdns.h	2007-05-26 00:07:48 UTC (rev 10346)
+++ tor/trunk/src/or/eventdns.h	2007-05-26 00:15:58 UTC (rev 10347)
@@ -324,7 +324,7 @@
 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);