aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-12-16 14:04:57 -0500
committerNick Mathewson <nickm@torproject.org>2016-12-16 14:04:57 -0500
commit762b799545ad200c126f0b7d9981630802688c2b (patch)
tree39b124e1ddcdb13c93be62712b9a6d872db2b867 /src
parent698ed75e1a4b55936e412a476b2f4880cd7b2fa7 (diff)
downloadtor-762b799545ad200c126f0b7d9981630802688c2b.tar.gz
tor-762b799545ad200c126f0b7d9981630802688c2b.zip
Rename 'remove' -> 'rmv' to avoid shadowing a libc global
Diffstat (limited to 'src')
-rw-r--r--src/or/entrynodes.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c
index 2e46aba02c..82601868ba 100644
--- a/src/or/entrynodes.c
+++ b/src/or/entrynodes.c
@@ -1287,7 +1287,7 @@ sampled_guards_update_from_consensus(guard_selection_t *gs)
/* Then: remove the ones that have been junk for too long */
SMARTLIST_FOREACH_BEGIN(gs->sampled_entry_guards, entry_guard_t *, guard) {
- int remove = 0;
+ int rmv = 0;
if (guard->currently_listed == 0 &&
guard->unlisted_since_date < remove_if_unlisted_since) {
@@ -1299,20 +1299,20 @@ sampled_guards_update_from_consensus(guard_selection_t *gs)
log_info(LD_GUARD, "Removing sampled guard %s: it has been unlisted "
"for over %d days", entry_guard_describe(guard),
get_remove_unlisted_guards_after_days());
- remove = 1;
+ rmv = 1;
} else if (guard->sampled_on_date < maybe_remove_if_sampled_before) {
/* We have a live consensus, and {ADDED_ON_DATE} is over
{GUARD_LIFETIME} ago, *and* {CONFIRMED_ON_DATE} is either
"never", or over {GUARD_CONFIRMED_MIN_LIFETIME} ago.
*/
if (guard->confirmed_on_date == 0) {
- remove = 1;
+ rmv = 1;
log_info(LD_GUARD, "Removing sampled guard %s: it was sampled "
"over %d days ago, but never confirmed.",
entry_guard_describe(guard),
get_guard_lifetime() / 86400);
} else if (guard->confirmed_on_date < remove_if_confirmed_before) {
- remove = 1;
+ rmv = 1;
log_info(LD_GUARD, "Removing sampled guard %s: it was sampled "
"over %d days ago, and confirmed over %d days ago.",
entry_guard_describe(guard),
@@ -1321,7 +1321,7 @@ sampled_guards_update_from_consensus(guard_selection_t *gs)
}
}
- if (remove) {
+ if (rmv) {
++n_changes;
SMARTLIST_DEL_CURRENT(gs->sampled_entry_guards, guard);
remove_guard_from_confirmed_and_primary_lists(gs, guard);