torproject / tor Public
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#21349: Refactor long functions in entrynodes.c (3) #202
Conversation
src/lib/container/smartlist.c
Outdated
| * values are matching). Otherwise, return false. | ||
| */ | ||
| int | ||
| smartlist_shallow_eq(const smartlist_t *s1, const smartlist_t *s2) |
For consistency with smartlist_ints_eq and smartlist_strings_eq, this should probably be called smartlist_ptrs_eq
src/lib/container/smartlist.c
Outdated
| int | ||
| smartlist_shallow_eq(const smartlist_t *s1, const smartlist_t *s2) | ||
| { | ||
| if (s1 == NULL || s2 == NULL) |
if s1 == NULL && s2 == NULL I think this function should return 1.
src/or/entrynodes.c
Outdated
| @@ -404,6 +404,17 @@ get_remove_unlisted_guards_after_days(void) | |||
| DFLT_REMOVE_UNLISTED_GUARDS_AFTER_DAYS, | |||
| 1, 365*10); | |||
| } | |||
|
|
|||
| /** | |||
| * If a guard has been unlisted for this many seconds continuously, we | |||
Usually we'll document a function by using a verb to describe what it does, like "Return the number of seconds after which we remove a guard that..."
src/or/entrynodes.c
Outdated
| SMARTLIST_FOREACH_BEGIN(gs->sampled_entry_guards, entry_guard_t *, guard) { | ||
| /* XXXX #20827 check ed ID too */ | ||
| const int is_listed = entry_guard_is_listed(gs, guard); | ||
|
|
||
| if (is_listed && ! guard->currently_listed) { | ||
| ++n_changes; |
None really, just a byproduct of some now-squashed fixup commits. Changed it back in 4a82c90 .
|
Superseded by #246. |
https://trac.torproject.org/projects/tor/ticket/21349
The text was updated successfully, but these errors were encountered: