diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-04 10:44:42 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-04 11:08:29 -0600 |
commit | 6214b358a5502915d977d3f850d34bcad71c4cde (patch) | |
tree | 3f8849570e0ecbb60e9778ab38225705e1f46101 /src/ratelimiter.c | |
parent | global: satisfy check_patch.pl errors (diff) | |
download | wireguard-monolithic-historical-6214b358a5502915d977d3f850d34bcad71c4cde.tar.xz wireguard-monolithic-historical-6214b358a5502915d977d3f850d34bcad71c4cde.zip |
global: prefer sizeof(*pointer) when possible
Suggested-by: Sultan Alsawaf <sultanxda@gmail.com>
Diffstat (limited to 'src/ratelimiter.c')
-rw-r--r-- | src/ratelimiter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ratelimiter.c b/src/ratelimiter.c index 836b4a6..6c7262a 100644 --- a/src/ratelimiter.c +++ b/src/ratelimiter.c @@ -173,12 +173,12 @@ int ratelimiter_init(void) (1U << 14) / sizeof(struct hlist_head))); max_entries = table_size * 8; - table_v4 = kvzalloc(table_size * sizeof(struct hlist_head), GFP_KERNEL); + table_v4 = kvzalloc(table_size * sizeof(*table_v4), GFP_KERNEL); if (!table_v4) goto err_kmemcache; #if IS_ENABLED(CONFIG_IPV6) - table_v6 = kvzalloc(table_size * sizeof(struct hlist_head), GFP_KERNEL); + table_v6 = kvzalloc(table_size * sizeof(*table_v6), GFP_KERNEL); if (!table_v6) { kvfree(table_v4); goto err_kmemcache; |