]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: ipt_CLUSTERIP: fix warning unused variable cn
authorAnders Roxell <anders.roxell@linaro.org>
Wed, 23 Jan 2019 11:48:11 +0000 (12:48 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 28 Jan 2019 10:09:12 +0000 (11:09 +0100)
commitcdefeb710fe67126b9193c2f2abbb030fb5acef8
treeaa71fb9c032e79868fd378500951b6abd1ddb6df
parent24c0058bd7fefb374db1cff63e057f9b6c39f550
netfilter: ipt_CLUSTERIP: fix warning unused variable cn

When CONFIG_PROC_FS isn't set the variable cn isn't used.

net/ipv4/netfilter/ipt_CLUSTERIP.c: In function ‘clusterip_net_exit’:
net/ipv4/netfilter/ipt_CLUSTERIP.c:849:24: warning: unused variable ‘cn’ [-Wunused-variable]
  struct clusterip_net *cn = clusterip_pernet(net);
                        ^~

Rework so the variable 'cn' is declared inside "#ifdef CONFIG_PROC_FS".

Fixes: e87c8f97aac0 ("netfilter: ipt_CLUSTERIP: remove wrong WARN_ON_ONCE in netns exit routine")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/ipt_CLUSTERIP.c