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

[or-cvs] Fix sign-related warnings



Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv25498/src/or

Modified Files:
	config.c connection.c 
Log Message:
Fix sign-related warnings

Index: config.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.264
retrieving revision 1.265
diff -u -d -r1.264 -r1.265
--- config.c	22 Nov 2004 22:24:10 -0000	1.264
+++ config.c	22 Nov 2004 22:50:17 -0000	1.265
@@ -2328,10 +2328,6 @@
     log_fn(LOG_WARN, "Interval '%s' is too long", s);
     *ok = 0;
     return -1;
-  } else if (r<0) {
-    log_fn(LOG_WARN, "Interval '%s' is negative", s);
-    *ok = 0;
-    return -1;
   }
   return (int)r;
 }

Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/connection.c,v
retrieving revision 1.295
retrieving revision 1.296
diff -u -d -r1.295 -r1.296
--- connection.c	22 Nov 2004 22:24:10 -0000	1.295
+++ connection.c	22 Nov 2004 22:50:17 -0000	1.296
@@ -735,11 +735,11 @@
   or_options_t *options = get_options();
 
   /* refill the global buckets */
-  if(global_read_bucket < options->BandwidthBurst) {
+  if((unsigned)global_read_bucket < options->BandwidthBurst) {
     global_read_bucket += (int)options->BandwidthRate;
     log_fn(LOG_DEBUG,"global_read_bucket now %d.", global_read_bucket);
   }
-  if(global_write_bucket < options->BandwidthBurst) {
+  if((unsigned)global_write_bucket < options->BandwidthBurst) {
     global_write_bucket += (int)options->BandwidthRate;
     log_fn(LOG_DEBUG,"global_write_bucket now %d.", global_write_bucket);
   }