Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 81ac2722fa19 ("net: ipconfig: Allow DNS to be overwritten by DHCPACK")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Arnd Bergmann and committed by
David S. Miller
dbb99d78 2ae9c66b

+3 -3
+3 -3
net/ipv4/ipconfig.c
··· 173 173 /* MTU for boot device */ 174 174 static int ic_dev_mtu __initdata; 175 175 176 - /* DHCPACK can overwrite DNS if fallback was set upon first BOOTP reply */ 177 - static int ic_nameservers_fallback __initdata; 178 - 179 176 #ifdef IPCONFIG_DYNAMIC 180 177 static DEFINE_SPINLOCK(ic_recv_lock); 181 178 static volatile int ic_got_reply __initdata; /* Proto(s) that replied */ ··· 664 667 .type = cpu_to_be16(ETH_P_IP), 665 668 .func = ic_bootp_recv, 666 669 }; 670 + 671 + /* DHCPACK can overwrite DNS if fallback was set upon first BOOTP reply */ 672 + static int ic_nameservers_fallback __initdata; 667 673 668 674 /* 669 675 * Initialize DHCP/BOOTP extension fields in the request.