aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2011-09-27 17:35:31 -0400
committerRoger Dingledine <arma@torproject.org>2011-09-27 17:35:31 -0400
commite98c9a1bf6e64a641fd904cbef58b1e46da89e91 (patch)
tree0199ec93ac4636bddca6a901b6b8ec8e2c94f0ef /src/or/circuitbuild.c
parent88516f65c9753d6ec60dd7cb0c28c3ff91fdb101 (diff)
downloadtor-e98c9a1bf6e64a641fd904cbef58b1e46da89e91.tar.gz
tor-e98c9a1bf6e64a641fd904cbef58b1e46da89e91.zip
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.
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 902931575b..08a1f6fa15 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -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)) {