ratelim.h: use COCCI to hide an initializer.

This commit is contained in:
Nick Mathewson 2019-10-09 13:09:44 -04:00
parent c77f57d37b
commit 189375fb5d

View File

@ -45,7 +45,9 @@ typedef struct ratelim_t {
int n_calls_since_last_time; int n_calls_since_last_time;
} ratelim_t; } ratelim_t;
#ifndef COCCI
#define RATELIM_INIT(r) { (r), 0, 0 } #define RATELIM_INIT(r) { (r), 0, 0 }
#endif
#define RATELIM_TOOMANY (16*1000*1000) #define RATELIM_TOOMANY (16*1000*1000)
char *rate_limit_log(ratelim_t *lim, time_t now); char *rate_limit_log(ratelim_t *lim, time_t now);