Skip to content

Commit

Permalink
netfilter: connlimit: fix UP build
Browse files Browse the repository at this point in the history
cannot use ARRAY_SIZE() if spinlock_t is empty struct.

Fixes: 1442e75 ("netfilter: connlimit: use keyed locks")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Florian Westphal authored and Pablo Neira Ayuso committed Apr 3, 2014
1 parent e33d0ba commit e5ac6ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/xt_connlimit.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ static int connlimit_mt_check(const struct xt_mtchk_param *par)
return -ENOMEM;
}

for (i = 0; i < ARRAY_SIZE(info->data->locks); ++i)
for (i = 0; i < CONNLIMIT_LOCK_SLOTS; ++i)
spin_lock_init(&info->data->locks[i]);

for (i = 0; i < ARRAY_SIZE(info->data->climit_root4); ++i)
Expand Down

0 comments on commit e5ac6ea

Please sign in to comment.