]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Switch a SMARTLIST_FOREACH in circuitbuild.c to BEGIN/END
authorNick Mathewson <nickm@torproject.org>
Wed, 31 Aug 2011 00:35:17 +0000 (20:35 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 31 Aug 2011 00:44:30 +0000 (20:44 -0400)
It had some cpp stuff inside, and older GCCs don't like preprocessor
directives inside macro arguments.

Found by grarpamp.

src/or/circuitbuild.c

index a63e89b126f23ae21f047cff688050e3b3c08df0..3c1f63a9cd42507e24dca653eb360b2b42ac750b 100644 (file)
@@ -4095,7 +4095,7 @@ choose_random_entry(cpath_build_state_t *state)
 
  retry:
   smartlist_clear(live_entry_guards);
-  SMARTLIST_FOREACH(entry_guards, entry_guard_t *, entry,
+  SMARTLIST_FOREACH_BEGIN(entry_guards, entry_guard_t *, entry)
     {
       const char *msg;
       r = entry_is_live(entry, need_uptime, need_capacity, 0, &msg);
@@ -4131,7 +4131,8 @@ choose_random_entry(cpath_build_state_t *state)
       }
       if (smartlist_len(live_entry_guards) >= options->NumEntryGuards)
         break; /* we have enough */
-    });
+    }
+  SMARTLIST_FOREACH_END(entry);
 
   if (entry_list_is_constrained(options)) {
     /* If we prefer the entry nodes we've got, and we have at least