aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-02-12 19:42:35 -0500
committerNick Mathewson <nickm@torproject.org>2012-02-12 19:42:35 -0500
commit61452299d1067298a2865deb6398b1fb269b2a81 (patch)
tree6122000a10967de51ef46dc69ec8a872ee0b0219 /src
parent93dbc17a1aa77c574977a3a13e4829a0599e787d (diff)
downloadtor-61452299d1067298a2865deb6398b1fb269b2a81.tar
tor-61452299d1067298a2865deb6398b1fb269b2a81.tar.gz
Unpack a smartlist_foreach and add an assert: try to hunt #5102
Diffstat (limited to 'src')
-rw-r--r--src/or/circuitbuild.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 07598e242..7c404e63c 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -3906,14 +3906,14 @@ entry_guard_register_connect_status(const char *digest, int succeeded,
if (! entry_guards)
return 0;
- SMARTLIST_FOREACH(entry_guards, entry_guard_t *, e,
- {
- if (tor_memeq(e->identity, digest, DIGEST_LEN)) {
- entry = e;
- idx = e_sl_idx;
- break;
- }
- });
+ SMARTLIST_FOREACH_BEGIN(entry_guards, entry_guard_t *, e) {
+ tor_assert(e);
+ if (tor_memeq(e->identity, digest, DIGEST_LEN)) {
+ entry = e;
+ idx = e_sl_idx;
+ break;
+ }
+ } SMARTLIST_FOREACH_END(e);
if (!entry)
return 0;