diff --git a/include/ucore/rate_limit.h b/include/ucore/rate_limit.h index fdcb656..f3b4038 100644 --- a/include/ucore/rate_limit.h +++ b/include/ucore/rate_limit.h @@ -71,8 +71,8 @@ struct RateLimit { * @param tickets number of tickets (bucket depth) * @param period per this period */ -#define UC_RATELIMIT_INITIALIZER(tickets)\ -{ tickets, period, 0, -period} +#define UC_RATELIMIT_INITIALIZER(tickets, period)\ +{ (tickets,) (period), 0, -(period)}