netfilter: connlimit: fix UP build

cannot use ARRAY_SIZE() if spinlock_t is empty struct.

Fixes: 1442e7507d ("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>
This commit is contained in:
Florian Westphal 2014-03-17 22:27:50 +01:00 committed by Pablo Neira Ayuso
parent e33d0ba804
commit e5ac6eafba
1 changed files with 1 additions and 1 deletions

View File

@ -377,7 +377,7 @@ static int connlimit_mt_check(const struct xt_mtchk_param *par)
return -ENOMEM; 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]); spin_lock_init(&info->data->locks[i]);
for (i = 0; i < ARRAY_SIZE(info->data->climit_root4); ++i) for (i = 0; i < ARRAY_SIZE(info->data->climit_root4); ++i)