[tor-commits] [tor/master] ratelim.h: use COCCI to hide an initializer.

teor at torproject.org teor at torproject.org
Thu Oct 24 00:01:21 UTC 2019


commit 189375fb5dfb6757f1aa0ed36532d933fc382e1e
Author: Nick Mathewson <nickm at torproject.org>
Date:   Wed Oct 9 13:09:44 2019 -0400

    ratelim.h: use COCCI to hide an initializer.
---
 src/lib/log/ratelim.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/log/ratelim.h b/src/lib/log/ratelim.h
index 1db54ba72..64f52df66 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);





More information about the tor-commits mailing list