]> 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)
commite9105bd647c5333b49cca2c4e8cff5783c379045
treeaa71fb9c032e79868fd378500951b6abd1ddb6df
parent58b5b919c7ec4ebf6a777239d7e9b905d35b3f04
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: 545ba5a5dee5 ("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