Skip to content

Commit dbb99d7

Browse files
arndbdavem330
authored andcommitted
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: 81ac272 ("net: ipconfig: Allow DNS to be overwritten by DHCPACK") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2ae9c66 commit dbb99d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

net/ipv4/ipconfig.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,6 @@ static int ic_proto_have_if __initdata;
173173
/* MTU for boot device */
174174
static int ic_dev_mtu __initdata;
175175

176-
/* DHCPACK can overwrite DNS if fallback was set upon first BOOTP reply */
177-
static int ic_nameservers_fallback __initdata;
178-
179176
#ifdef IPCONFIG_DYNAMIC
180177
static DEFINE_SPINLOCK(ic_recv_lock);
181178
static volatile int ic_got_reply __initdata; /* Proto(s) that replied */
@@ -668,6 +665,9 @@ static struct packet_type bootp_packet_type __initdata = {
668665
.func = ic_bootp_recv,
669666
};
670667

668+
/* DHCPACK can overwrite DNS if fallback was set upon first BOOTP reply */
669+
static int ic_nameservers_fallback __initdata;
670+
671671
/*
672672
* Initialize DHCP/BOOTP extension fields in the request.
673673
*/

0 commit comments

Comments
 (0)