aboutsummaryrefslogtreecommitdiff
path: root/src/lib/log
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-10-09 13:09:44 -0400
committerNick Mathewson <nickm@torproject.org>2019-10-22 09:32:13 -0400
commit189375fb5dfb6757f1aa0ed36532d933fc382e1e (patch)
tree3ca06c17f2f2888e6b6557689a0045212e03f342 /src/lib/log
parentc77f57d37bbea4e7281c2de95a9f19b885290111 (diff)
downloadtor-189375fb5dfb6757f1aa0ed36532d933fc382e1e.tar.gz
tor-189375fb5dfb6757f1aa0ed36532d933fc382e1e.zip
ratelim.h: use COCCI to hide an initializer.
Diffstat (limited to 'src/lib/log')
-rw-r--r--src/lib/log/ratelim.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/log/ratelim.h b/src/lib/log/ratelim.h
index 1db54ba726..64f52df666 100644
--- a/src/lib/log/ratelim.h
+++ b/src/lib/log/ratelim.h
@@ -45,7 +45,9 @@ typedef struct ratelim_t {
int n_calls_since_last_time;
} ratelim_t;
+#ifndef COCCI
#define RATELIM_INIT(r) { (r), 0, 0 }
+#endif
#define RATELIM_TOOMANY (16*1000*1000)
char *rate_limit_log(ratelim_t *lim, time_t now);