Commit dbb99d78 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by David S. Miller

net: ipconfig: move ic_nameservers_fallback into #ifdef block

The new variable is only used when IPCONFIG_BOOTP is defined and otherwise
causes a warning:

net/ipv4/ipconfig.c:177:12: error: 'ic_nameservers_fallback' defined but not used [-Werror=unused-variable]

Move it next to the user.

Fixes: 81ac2722 ("net: ipconfig: Allow DNS to be overwritten by DHCPACK")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2ae9c66b
...@@ -173,9 +173,6 @@ static int ic_proto_have_if __initdata; ...@@ -173,9 +173,6 @@ static int ic_proto_have_if __initdata;
/* MTU for boot device */ /* MTU for boot device */
static int ic_dev_mtu __initdata; static int ic_dev_mtu __initdata;
/* DHCPACK can overwrite DNS if fallback was set upon first BOOTP reply */
static int ic_nameservers_fallback __initdata;
#ifdef IPCONFIG_DYNAMIC #ifdef IPCONFIG_DYNAMIC
static DEFINE_SPINLOCK(ic_recv_lock); static DEFINE_SPINLOCK(ic_recv_lock);
static volatile int ic_got_reply __initdata; /* Proto(s) that replied */ static volatile int ic_got_reply __initdata; /* Proto(s) that replied */
...@@ -668,6 +665,9 @@ static struct packet_type bootp_packet_type __initdata = { ...@@ -668,6 +665,9 @@ static struct packet_type bootp_packet_type __initdata = {
.func = ic_bootp_recv, .func = ic_bootp_recv,
}; };
/* DHCPACK can overwrite DNS if fallback was set upon first BOOTP reply */
static int ic_nameservers_fallback __initdata;
/* /*
* Initialize DHCP/BOOTP extension fields in the request. * Initialize DHCP/BOOTP extension fields in the request.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment