diff options
author | George Kadianakis <desnacked@riseup.net> | 2014-06-09 18:23:41 +0100 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2014-06-15 19:02:59 -0700 |
commit | c7b05a6aefc012b769443e7299e5a8fe13b32fa8 (patch) | |
tree | 51ea5ed3f72b70191c5d61b0433d75904433f1aa /src/or/entrynodes.c | |
parent | a59429f1e49d2666d31ec9a3b34dd861c96cddaa (diff) | |
download | tor-c7b05a6aefc012b769443e7299e5a8fe13b32fa8.tar.gz tor-c7b05a6aefc012b769443e7299e5a8fe13b32fa8.zip |
Constify aggressively in populate_live_entry_guards().
Diffstat (limited to 'src/or/entrynodes.c')
-rw-r--r-- | src/or/entrynodes.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c index 4ece81e1db..50138cddab 100644 --- a/src/or/entrynodes.c +++ b/src/or/entrynodes.c @@ -155,7 +155,7 @@ entry_guard_set_status(entry_guard_t *e, const node_t *node, /** Return true iff enough time has passed since we last tried to connect * to the unreachable guard <b>e</b> that we're willing to try again. */ static int -entry_is_time_to_retry(entry_guard_t *e, time_t now) +entry_is_time_to_retry(const entry_guard_t *e, time_t now) { long diff; if (e->last_attempted < e->unreachable_since) @@ -189,7 +189,7 @@ entry_is_time_to_retry(entry_guard_t *e, time_t now) * a descriptor (routerinfo or microdesc) for it. */ static INLINE const node_t * -entry_is_live(entry_guard_t *e, int need_uptime, int need_capacity, +entry_is_live(const entry_guard_t *e, int need_uptime, int need_capacity, int assume_reachable, int need_descriptor, const char **msg) { const node_t *node; @@ -1017,7 +1017,7 @@ populate_live_entry_guards(smartlist_t *live_entry_guards, nodelist_add_node_and_family(exit_family, chosen_exit); } - SMARTLIST_FOREACH_BEGIN(entry_guards, entry_guard_t *, entry) { + SMARTLIST_FOREACH_BEGIN(entry_guards, const entry_guard_t *, entry) { const char *msg; node = entry_is_live(entry, need_uptime, need_capacity, 0, need_descriptor, &msg); |