From 9eaec6d8f5cba1a95c7072c95d0a13726352aaea Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 3 Oct 2017 06:18:45 +0200 Subject: global: satisfy bitshift pedantry Suggested-by: Sultan Alsawaf --- src/ratelimiter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ratelimiter.c') diff --git a/src/ratelimiter.c b/src/ratelimiter.c index c4281e1..0afcdac 100644 --- a/src/ratelimiter.c +++ b/src/ratelimiter.c @@ -150,7 +150,7 @@ int ratelimiter_init(void) * but what it shares in common is that it uses a massive hashtable. So, * we borrow their wisdom about good table sizes on different systems * dependent on RAM. This calculation here comes from there. */ - table_size = (totalram_pages > (1 << 30) / PAGE_SIZE) ? 8192 : max_t(unsigned long, 16, roundup_pow_of_two((totalram_pages << PAGE_SHIFT) / (1 << 14) / sizeof(struct hlist_head))); + table_size = (totalram_pages > (1U << 30) / PAGE_SIZE) ? 8192 : max_t(unsigned long, 16, roundup_pow_of_two((totalram_pages << PAGE_SHIFT) / (1U << 14) / sizeof(struct hlist_head))); max_entries = table_size * 8; table_v4 = kvzalloc(table_size * sizeof(struct hlist_head), GFP_KERNEL); -- cgit v1.2.3-59-g8ed1b