]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix sign-related warnings
authorNick Mathewson <nickm@torproject.org>
Mon, 22 Nov 2004 22:50:17 +0000 (22:50 +0000)
committerNick Mathewson <nickm@torproject.org>
Mon, 22 Nov 2004 22:50:17 +0000 (22:50 +0000)
svn:r2942

src/or/config.c
src/or/connection.c

index 8c578813a27cc964e8d33a76f4c0b0c6e4e20199..21321796e506640a78cd22fd4c5370d3eee22e8a 100644 (file)
@@ -2328,10 +2328,6 @@ config_parse_interval(const char *s, int *ok) {
     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 7035b8dc0ac6ee3256185730834bd2a4f0d31855..3a168d36877ccf15794c514dd9cf12c32c20045f 100644 (file)
@@ -735,11 +735,11 @@ void connection_bucket_refill(struct timeval *now) {
   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);
   }