diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-05-17 12:20:52 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-05-17 12:20:52 -0400 |
commit | d8a1e2dabbbbfc4a7f945cac978b5ddd97a4ee86 (patch) | |
tree | 926b8976b92b9052235e90d80c3f3f76b1356b2f | |
parent | 03dc1c786a9b154f17f9fd64ddf712d1ac9f30b0 (diff) | |
download | tor-d8a1e2dabbbbfc4a7f945cac978b5ddd97a4ee86.tar.gz tor-d8a1e2dabbbbfc4a7f945cac978b5ddd97a4ee86.zip |
Make rotate_request_period use BEGIN/END versions of FOREACH
This appeases some versions of MSVC, which don't like it when you
have preprocessor commands inside a set of macro arguments.
-rw-r--r-- | src/or/geoip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/geoip.c b/src/or/geoip.c index ea11dc323d..ad28a77ffd 100644 --- a/src/or/geoip.c +++ b/src/or/geoip.c @@ -369,7 +369,7 @@ geoip_get_mean_shares(time_t now, double *v2_share_out, static void rotate_request_period(void) { - SMARTLIST_FOREACH(geoip_countries, geoip_country_t *, c, { + SMARTLIST_FOREACH_BEGIN(geoip_countries, geoip_country_t *, c) { #if REQUEST_HIST_LEN > 1 memmove(&c->n_v2_ns_requests[0], &c->n_v2_ns_requests[1], sizeof(uint32_t)*(REQUEST_HIST_LEN-1)); @@ -378,7 +378,7 @@ rotate_request_period(void) #endif c->n_v2_ns_requests[REQUEST_HIST_LEN-1] = 0; c->n_v3_ns_requests[REQUEST_HIST_LEN-1] = 0; - }); + } SMARTLIST_FOREACH_END(c); current_request_period_starts += REQUEST_HIST_PERIOD; if (n_old_request_periods < REQUEST_HIST_LEN-1) ++n_old_request_periods; |