[or-cvs] r8654: Fix signed/unsigned compare warning in eventdns.c (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Sun Oct 8 21:05:07 UTC 2006


Author: nickm
Date: 2006-10-08 17:05:06 -0400 (Sun, 08 Oct 2006)
New Revision: 8654

Modified:
   tor/trunk/
   tor/trunk/src/or/eventdns.c
Log:
 r8947 at totoro:  nickm | 2006-10-08 17:04:30 -0400
 Fix signed/unsigned compare warning in eventdns.c



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r8947] on 96637b51-b116-0410-a10e-9941ebb49b64

Modified: tor/trunk/src/or/eventdns.c
===================================================================
--- tor/trunk/src/or/eventdns.c	2006-10-08 20:36:31 UTC (rev 8653)
+++ tor/trunk/src/or/eventdns.c	2006-10-08 21:05:06 UTC (rev 8654)
@@ -1184,13 +1184,13 @@
 evdns_request_data_build(const char *const name, const int name_len, const u16 trans_id,
 							const u16 type, const u16 class,
 						 u8 *const buf, size_t buf_len) {
-	int j = 0;	// current offset into buf
+	off_t j = 0;	// current offset into buf
 	u16 _t;	 // used by the macros
 	u8 *labels;
 	int labels_len;
 
 #define APPEND16(x) do {                           \
-        if (j + 2 > buf_len)                       \
+        if (j + 2 > buf_len)			   \
             return (-1);                           \
         _t = htons(x);                             \
         memcpy(buf + j, &_t, 2);                   \



More information about the tor-commits mailing list