aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_hs_descriptor.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-03-13 16:43:30 -0400
committerNick Mathewson <nickm@torproject.org>2017-03-13 16:43:30 -0400
commitdc37ea8b9815e75905a6b8b606947866afc9b27b (patch)
tree73053e434184e8725c3f25ff07eedbee0aadddb3 /src/test/test_hs_descriptor.c
parentd9cd4b7072f6292680c188ccb9fe8d2c5be4f610 (diff)
downloadtor-dc37ea8b9815e75905a6b8b606947866afc9b27b.tar.gz
tor-dc37ea8b9815e75905a6b8b606947866afc9b27b.zip
Add a null statement to prevent some SMARTLIST_FOREACH() bugs.
So we require that SMARTLIST_FOREACH_END() have the name of the loop variable in it. But right now the only enforcement for that is to clear the variable at the end of the loop, which is really not sufficient: I spent 45 minutes earlier today debugging an issue where I had said: SMARTLIST_FOREACH_BEGIN(spool, spooled_resource_t *, spooled) { ... } SMARTLIST_FOREACH_END(spool); This patch makes it so that ONLY loop variables can be used, by referring to the _sl_idx variable.
Diffstat (limited to 'src/test/test_hs_descriptor.c')
0 files changed, 0 insertions, 0 deletions