summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-13 17:48:33 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-13 17:48:33 -0400
commit83b8a76f0c246bde442f36681a59a735896110cd (patch)
treee1b0a604b288d91ef9fda47f4883afb7e69238e3
parentb943721b2a3e31ee743fa2daaf70380b9e8f3e0e (diff)
downloadtor-83b8a76f0c246bde442f36681a59a735896110cd.tar.gz
tor-83b8a76f0c246bde442f36681a59a735896110cd.zip
Fix a shadowed-global warning in geoip.c
Bugfix on 5ab2110eb6b4ae9082430081cb2800018cf0dcd6; bug not in any released Tor.
-rw-r--r--src/feature/stats/geoip.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/feature/stats/geoip.c b/src/feature/stats/geoip.c
index d891bd80e2..019aa7a283 100644
--- a/src/feature/stats/geoip.c
+++ b/src/feature/stats/geoip.c
@@ -1121,13 +1121,13 @@ geoip_get_dirreq_history(dirreq_type_t type)
dltimes = tor_calloc(complete, sizeof(uint32_t));
SMARTLIST_FOREACH_BEGIN(dirreq_completed, dirreq_map_entry_t *, ent) {
uint32_t bytes_per_second;
- uint32_t time_diff = (uint32_t) tv_mdiff(&ent->request_time,
+ uint32_t time_diff_ = (uint32_t) tv_mdiff(&ent->request_time,
&ent->completion_time);
- if (time_diff == 0)
- time_diff = 1; /* Avoid DIV/0; "instant" answers are impossible
+ if (time_diff_ == 0)
+ time_diff_ = 1; /* Avoid DIV/0; "instant" answers are impossible
* by law of nature or something, but a millisecond
* is a bit greater than "instantly" */
- bytes_per_second = (uint32_t)(1000 * ent->response_size / time_diff);
+ bytes_per_second = (uint32_t)(1000 * ent->response_size / time_diff_);
dltimes[ent_sl_idx] = bytes_per_second;
} SMARTLIST_FOREACH_END(ent);
median_uint32(dltimes, complete); /* sorts as a side effect. */