Skip to contentSkip to conversation

netfilter/ipvs: Fix unused variable warning

PATCH In review Borislav Petkov 2 participants 2 messages Feb 16, 2019 – Feb 17, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netfilter/ipvs: Fix unused variable warning

From: Borislav Petkov <[email protected]>

Move the local variable 'ret' into the IP_VS_IPV6 ifdef so that the unused variable warning doesn't fire for randconfig builds with CONFIG_IP_VS_IPV6 disabled.

Fixes 098e13f5b21d ("ipvs: fix dependency on nf_defrag_ipv6")
Cc Andrea Claudi <[email protected]>
Cc Florian Westphal <[email protected]>
Cc Jozsef Kadlecsik <[email protected]>
Cc Julian Anastasov <[email protected]>
Cc Li Shuang <[email protected]>
Cc Pablo Neira Ayuso <[email protected]>
Cc Simon Horman <[email protected]>
---
 net/netfilter/ipvs/ip_vs_ctl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/netfilter/ipvs/ip_vs_ctl.c +2 -1
index 86afacb07e5f..ac8d848d7624 100644
@@ -896,12 +896,13 @@ ip_vs_new_dest(struct ip_vs_service *svc, struct ip_vs_dest_user_kern *udest,
 {
 	struct ip_vs_dest *dest;
 	unsigned int atype, i;
-	int ret = 0;
 
 	EnterFunction(2);
 
 #ifdef CONFIG_IP_VS_IPV6
 	if (udest->af == AF_INET6) {
+		int ret;
+
 		atype = ipv6_addr_type(&udest->addr.in6);
 		if ((!(atype & IPV6_ADDR_UNICAST) ||
 			atype & IPV6_ADDR_LINKLOCAL) &&
Signature · 1 line
2.19.1