net: ipv4: ipconfig: fix unused variable
authorAnders Roxell <anders.roxell@linaro.org>
Sun, 13 May 2018 19:48:30 +0000 (21:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 May 2018 00:27:25 +0000 (20:27 -0400)
commit289e1f4e9e4a09c73a1c0152bb93855ea351ccda
tree0b4bf1bc7767c4d95f6e66601ac34ce7cbdae99e
parentb2d6cee117f708d493c020f9f355297321507be7
net: ipv4: ipconfig: fix unused variable

When CONFIG_PROC_FS isn't set, variable ipconfig_dir isn't used.
net/ipv4/ipconfig.c:167:31: warning: ‘ipconfig_dir’ defined but not used [-Wunused-variable]
 static struct proc_dir_entry *ipconfig_dir;
                               ^~~~~~~~~~~~
Move the declaration of ipconfig_dir inside the CONFIG_PROC_FS ifdef to
fix the warning.

Fixes: c04d2cb2009f ("ipconfig: Write NTP server IPs to /proc/net/ipconfig/ntp_servers")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ipconfig.c