aboutsummaryrefslogtreecommitdiff
path: root/src/or/rephist.c
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@torproject.org>2018-09-14 18:35:44 +0000
committerMike Perry <mikeperry-git@torproject.org>2018-09-17 22:19:05 +0000
commit7dc435e6bc4361ab52eac834eac5d30351f4f7b7 (patch)
treeaa18cfab837032d6e8ba674a1b0536ad8da00cc6 /src/or/rephist.c
parentc02f2d9eb45786c552dcc33c102e9964d95f66c1 (diff)
downloadtor-7dc435e6bc4361ab52eac834eac5d30351f4f7b7.tar.gz
tor-7dc435e6bc4361ab52eac834eac5d30351f4f7b7.zip
Promote rep_hist bw functions to uint64_t.
The rest of rephist uses uint64_t internally. Let's make these take it too, so we don't have to worry about overflowing size_t on 32 bit systems.
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r--src/or/rephist.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c
index f0bac57898..7223c3759b 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -1363,7 +1363,7 @@ bw_arrays_init(void)
* earlier than the latest <b>when</b> you've heard of.
*/
void
-rep_hist_note_bytes_written(size_t num_bytes, time_t when)
+rep_hist_note_bytes_written(uint64_t num_bytes, time_t when)
{
/* Maybe a circular array for recent seconds, and step to a new point
* every time a new second shows up. Or simpler is to just to have
@@ -1380,7 +1380,7 @@ rep_hist_note_bytes_written(size_t num_bytes, time_t when)
* (like rep_hist_note_bytes_written() above)
*/
void
-rep_hist_note_bytes_read(size_t num_bytes, time_t when)
+rep_hist_note_bytes_read(uint64_t num_bytes, time_t when)
{
/* if we're smart, we can make this func and the one above share code */
add_obs(read_array, when, num_bytes);
@@ -1390,7 +1390,7 @@ rep_hist_note_bytes_read(size_t num_bytes, time_t when)
* <b>when</b>. (like rep_hist_note_bytes_written() above)
*/
void
-rep_hist_note_dir_bytes_written(size_t num_bytes, time_t when)
+rep_hist_note_dir_bytes_written(uint64_t num_bytes, time_t when)
{
add_obs(dir_write_array, when, num_bytes);
}
@@ -1399,7 +1399,7 @@ rep_hist_note_dir_bytes_written(size_t num_bytes, time_t when)
* <b>when</b>. (like rep_hist_note_bytes_written() above)
*/
void
-rep_hist_note_dir_bytes_read(size_t num_bytes, time_t when)
+rep_hist_note_dir_bytes_read(uint64_t num_bytes, time_t when)
{
add_obs(dir_read_array, when, num_bytes);
}