netfilter: connlimit: fix UP build
authorFlorian Westphal <fw@strlen.de>
Mon, 17 Mar 2014 21:27:50 +0000 (22:27 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 3 Apr 2014 21:52:07 +0000 (23:52 +0200)
cannot use ARRAY_SIZE() if spinlock_t is empty struct.

Fixes: 1442e7507dd597 ("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>
net/netfilter/xt_connlimit.c

index 458464e7bd7a841915aeebdd448cb17bb49c01e4..a6e129eb3aa05688d2335ef7c33a8bf62290253c 100644 (file)
@@ -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)