diff --git a/include/ucore/rate_limit.h b/include/ucore/rate_limit.h index 367aae9..748bef3 100644 --- a/include/ucore/rate_limit.h +++ b/include/ucore/rate_limit.h @@ -70,8 +70,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)}