mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
ratelim.h: use COCCI to hide an initializer.
This commit is contained in:
parent
c77f57d37b
commit
189375fb5d
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user