aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-04-09 18:45:08 -0400
committerNick Mathewson <nickm@torproject.org>2010-09-27 14:22:18 -0400
commita16ed90ec8abc329aafe0b893a7533fff480d2ff (patch)
tree8d93ef7a62ef733ad3a990d428c7242345b443a4 /src/or/main.c
parent865bea3b895831a486b024e90f58d72d025ce284 (diff)
downloadtor-a16ed90ec8abc329aafe0b893a7533fff480d2ff.tar.gz
tor-a16ed90ec8abc329aafe0b893a7533fff480d2ff.zip
Document and/or fix stuff found by Sebastian in code review
Thanks to Sebastian for his code-review of the bufferevents patch series.x
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 1979529f72..adc2d3dae3 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1417,8 +1417,8 @@ second_elapsed_callback(periodic_timer_t *timer, void *arg)
seconds_elapsed = current_second ? (int)(now - current_second) : 0;
#ifdef USE_BUFFEREVENTS
connection_get_rate_limit_totals(&cur_read, &cur_written);
- bytes_written = ((size_t)cur_written) - stats_prev_n_written;
- bytes_read = ((size_t)cur_read) - stats_prev_n_read;
+ bytes_written = (size_t)(cur_written - stats_prev_n_written);
+ bytes_read = (size_t)(cur_read - stats_prev_n_read);
#else
bytes_written = stats_prev_global_write_bucket - global_write_bucket;
bytes_read = stats_prev_global_read_bucket - global_read_bucket;