From f599adf40ad702f26680ab6a7bbf869c788dd860 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sat, 24 Feb 2007 07:37:45 +0000 Subject: 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 --- src/or/circuitbuild.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/or') 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); } }); -- cgit v1.2.3