]> git.ipfire.org Git - thirdparty/tor.git/commit
Change all SMARTLIST_FOREACH loops of >=10 lines to use BEGIN/END
authorNick Mathewson <nickm@torproject.org>
Tue, 17 Jul 2012 13:33:38 +0000 (09:33 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 17 Jul 2012 14:34:08 +0000 (10:34 -0400)
commit7faf115dfffaf12cdae98eac71fc6811059c6657
tree61d42ba38202e6cb233cc89082228abbd55a4b56
parent21c6c8485367ce66ab0791c153177c17bccd25c5
Change all SMARTLIST_FOREACH loops of >=10 lines to use BEGIN/END

The SMARTLIST_FOREACH macro is more convenient than BEGIN/END when
you have a nice short loop body, but using it for long bodies makes
your preprocessor tell the compiler that all the code is on the same
line.  That causes grief, since compiler warnings and debugger lines
will all refer to that one line.

So, here's a new style rule: SMARTLIST_FOREACH blocks need to be
short.
19 files changed:
changes/smartlist_foreach [new file with mode: 0644]
src/common/log.c
src/or/circuitbuild.c
src/or/config.c
src/or/connection.c
src/or/connection_edge.c
src/or/control.c
src/or/cpuworker.c
src/or/directory.c
src/or/dirserv.c
src/or/dirvote.c
src/or/geoip.c
src/or/main.c
src/or/networkstatus.c
src/or/policies.c
src/or/routerlist.c
src/or/routerparse.c
src/test/test.c
src/test/test_util.c