Skip to contentSkip to conversation

ip6mr: delete redundant variable

PATCH In review Wang Chen 1 participant 1 message Jul 23, 2008

Subsystems (3)
lore
Share & tools
lore

Wang Chen

author
#0 lore raw

PATCH 2/2 ip6mr: delete redundant variable

*v can be removed as this patch showing.
Same as that of ipv4.

---

net/ipv6/ip6mr.c +2 -4
index 095bc45..49c75b4 100644
@@ -932,7 +932,6 @@ static int ip6mr_device_event(struct notifier_block *this,
 			      unsigned long event, void *ptr)
 {
 	struct net_device *dev = ptr;
-	struct mif_device *v;
 	int ct;
 
 	if (!net_eq(dev_net(dev), &init_net))
@@ -941,9 +940,8 @@ static int ip6mr_device_event(struct notifier_block *this,
 	if (event != NETDEV_UNREGISTER)
 		return NOTIFY_DONE;
 
-	v = &vif6_table[0];
-	for (ct = 0; ct < maxvif; ct++, v++) {
-		if (v->dev == dev)
+	for (ct = 0; ct < maxvif; ct++) {
+		if (vif6_table[ct].dev == dev)
 			mif6_delete(ct);
 	}
 	return NOTIFY_DONE;