aboutsummaryrefslogtreecommitdiff
path: root/src/or/rephist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-07-28 10:22:10 -0400
committerNick Mathewson <nickm@torproject.org>2016-07-28 10:22:10 -0400
commit9fe6fea1cceb39fc415ad813020bbd863121e0c9 (patch)
tree0437c4df402c6b7128d67e8c34d981bdd656b400 /src/or/rephist.c
parent0390e1a60cb91fa581ec568879bf300224db6322 (diff)
downloadtor-9fe6fea1cceb39fc415ad813020bbd863121e0c9.tar.gz
tor-9fe6fea1cceb39fc415ad813020bbd863121e0c9.zip
Fix a huge pile of -Wshadow warnings.
These appeared on some of the Jenkins platforms. Apparently some GCCs care when you shadow globals, and some don't.
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r--src/or/rephist.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c
index 929e95d86c..0eab5e099f 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -743,14 +743,15 @@ rep_history_clean(time_t before)
orhist_it = digestmap_iter_init(history_map);
while (!digestmap_iter_done(orhist_it)) {
- int remove;
+ int should_remove;
digestmap_iter_get(orhist_it, &d1, &or_history_p);
or_history = or_history_p;
- remove = authority ? (or_history->total_run_weights < STABILITY_EPSILON &&
+ should_remove = authority ?
+ (or_history->total_run_weights < STABILITY_EPSILON &&
!or_history->start_of_run)
: (or_history->changed < before);
- if (remove) {
+ if (should_remove) {
orhist_it = digestmap_iter_next_rmv(history_map, orhist_it);
free_or_history(or_history);
continue;
@@ -2294,16 +2295,16 @@ void
rep_hist_add_buffer_stats(double mean_num_cells_in_queue,
double mean_time_cells_in_queue, uint32_t processed_cells)
{
- circ_buffer_stats_t *stat;
+ circ_buffer_stats_t *stats;
if (!start_of_buffer_stats_interval)
return; /* Not initialized. */
- stat = tor_malloc_zero(sizeof(circ_buffer_stats_t));
- stat->mean_num_cells_in_queue = mean_num_cells_in_queue;
- stat->mean_time_cells_in_queue = mean_time_cells_in_queue;
- stat->processed_cells = processed_cells;
+ stats = tor_malloc_zero(sizeof(circ_buffer_stats_t));
+ stats->mean_num_cells_in_queue = mean_num_cells_in_queue;
+ stats->mean_time_cells_in_queue = mean_time_cells_in_queue;
+ stats->processed_cells = processed_cells;
if (!circuits_for_buffer_stats)
circuits_for_buffer_stats = smartlist_new();
- smartlist_add(circuits_for_buffer_stats, stat);
+ smartlist_add(circuits_for_buffer_stats, stats);
}
/** Remember cell statistics for circuit <b>circ</b> at time