summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/or/config.c4
-rw-r--r--src/or/connection.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 8c578813a2..21321796e5 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -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;
}
diff --git a/src/or/connection.c b/src/or/connection.c
index 7035b8dc0a..3a168d3687 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -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);
}