ipv6: fib6_ifdown cleanup
authorstephen hemminger <shemminger@vyatta.com>
Thu, 16 Dec 2010 17:42:40 +0000 (17:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 19 Dec 2010 06:01:16 +0000 (22:01 -0800)
Remove (unnecessary) casts to make code cleaner.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c

index d5c3b45d829e39ee0f5879290226ae771c3e110f..373bd0416f69f9ad7e4645eebb574a3ec4eb4127 100644 (file)
@@ -2009,11 +2009,11 @@ struct arg_dev_net {
 
 static int fib6_ifdown(struct rt6_info *rt, void *arg)
 {
-       struct net_device *dev = ((struct arg_dev_net *)arg)->dev;
-       struct net *net = ((struct arg_dev_net *)arg)->net;
+       const struct arg_dev_net *adn = arg;
+       const struct net_device *dev = adn->dev;
 
-       if (((void *)rt->rt6i_dev == dev || dev == NULL) &&
-           rt != net->ipv6.ip6_null_entry) {
+       if ((rt->rt6i_dev == dev || dev == NULL) &&
+           rt != adn->net->ipv6.ip6_null_entry) {
                RT6_TRACE("deleted by ifdown %p\n", rt);
                return -1;
        }