mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 07:07:52 +01:00
if we have enough usable guards, just pick one
we don't need to check whether we don't have enough guards right after concluding that we do have enough. slight efficiency fix suggested by an anonymous fellow on irc.
This commit is contained in:
parent
88516f65c9
commit
e98c9a1bf6
1 changed files with 1 additions and 1 deletions
|
@ -4186,7 +4186,7 @@ choose_random_entry(cpath_build_state_t *state)
|
|||
goto choose_and_finish;
|
||||
}
|
||||
if (smartlist_len(live_entry_guards) >= options->NumEntryGuards)
|
||||
break; /* we have enough */
|
||||
goto choose_and_finish; /* we have enough */
|
||||
} SMARTLIST_FOREACH_END(entry);
|
||||
|
||||
if (entry_list_is_constrained(options)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue