aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-02-24 07:37:45 +0000
committerNick Mathewson <nickm@torproject.org>2007-02-24 07:37:45 +0000
commitf599adf40ad702f26680ab6a7bbf869c788dd860 (patch)
tree8ede61d62d801797f6e39e276560cc3d30cb4182 /src/or/circuitbuild.c
parent2015479b5a8f58d78e379c434cda82e7c4a86b95 (diff)
downloadtor-f599adf40ad702f26680ab6a7bbf869c788dd860.tar
tor-f599adf40ad702f26680ab6a7bbf869c788dd860.tar.gz
r11909@catbus: nickm | 2007-02-24 02:37:40 -0500
Move tricky "delete the member of the smartlist currently under iteration" logic into its own happyfun macro. svn:r9633
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 58e85da59..fa6cd5108 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2280,8 +2280,7 @@ entry_guards_prepend_from_config(void)
/* Remove all currently configured entry guards from entry_routers. */
SMARTLIST_FOREACH(entry_routers, routerinfo_t *, ri, {
if (is_an_entry_guard(ri->cache_info.identity_digest)) {
- smartlist_del(entry_routers, ri_sl_idx--);
- ri_sl_len--;
+ SMARTLIST_DEL_CURRENT(entry_routers, ri);
}
});