Skip to contentSkip to conversation

mcastv6: Local variable shadows function argument

PATCH Applied Gerrit Renker 2 participants 2 messages Jul 21, 2009

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

PATCH v2 1/2 mcastv6: Local variable shadows function argument

Hi David,

can you please apply this small one.
Thanks to David L Stevens for clarification.

Gerrit

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Patch <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

mcastv6: Local variable shadows function argument

The local variable 'idev' shadows the function argument 'idev' to ip6_mc_add_src(). Fixed by removing the local declaration, as pmc->idev should be identical with 'idev' passed as argument.

---
 net/ipv6/mcast.c |    1 -
 1 file changed, 1 deletion(-)
net/ipv6/mcast.c +0 -1
@@ -2107,7 +2107,6 @@ static int ip6_mc_add_src(struct inet6_d
 		for (j=0; j<i; j++)
 			(void) ip6_mc_del1_src(pmc, sfmode, &psfsrc[i]);
 	} else if (isexclude != (pmc->mca_sfcount[MCAST_EXCLUDE] != 0)) {
-		struct inet6_dev *idev = pmc->idev;
 		struct ip6_sf_list *psf;
 
 		/* filter mode change */
maintainer Applied
#1 lore raw

From: Gerrit Renker <[email protected]>
Date: Tue, 21 Jul 2009 20:11:53 +0200

Quoted 8 lines

mcastv6: Local variable shadows function argument

The local variable 'idev' shadows the function argument 'idev' to ip6_mc_add_src(). Fixed by removing the local declaration, as pmc->idev should be identical with 'idev' passed as argument.

Applied to net-next-2.6