]> err.no Git - linux-2.6/commitdiff
[IPV6] ROUTE: Use &rt->u.dst instead of cast.
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Thu, 19 Oct 2006 04:50:09 +0000 (13:50 +0900)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 3 Dec 2006 05:22:06 +0000 (21:22 -0800)
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
net/ipv6/fib6_rules.c
net/ipv6/route.c

index 8377477b2c1931a1433c53b8a5917b04dd479219..25804cb69cf05f318baebf9282f0625072afbf45 100644 (file)
@@ -63,7 +63,7 @@ struct dst_entry *fib6_rule_lookup(struct flowi *fl, int flags,
                fib_rule_put(arg.rule);
 
        if (arg.result)
-               return (struct dst_entry *) arg.result;
+               return arg.result;
 
        dst_hold(&ip6_null_entry.u.dst);
        return &ip6_null_entry.u.dst;
index c86ee3adddcc86dcad86b81dcef736aecbcc2d0b..eb78b525224883f9c545f45d459adb06f6f94dcc 100644 (file)
@@ -940,7 +940,7 @@ struct dst_entry *ndisc_dst_alloc(struct net_device *dev,
        fib6_force_start_gc();
 
 out:
-       return (struct dst_entry *)rt;
+       return &rt->u.dst;
 }
 
 int ndisc_dst_gc(int *more)
@@ -1223,7 +1223,7 @@ out:
        if (idev)
                in6_dev_put(idev);
        if (rt)
-               dst_free((struct dst_entry *) rt);
+               dst_free(&rt->u.dst);
        return err;
 }
 
@@ -1822,7 +1822,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
                rt->rt6i_flags |= RTF_LOCAL;
        rt->rt6i_nexthop = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_gateway);
        if (rt->rt6i_nexthop == NULL) {
-               dst_free((struct dst_entry *) rt);
+               dst_free(&rt->u.dst);
                return ERR_PTR(-ENOMEM);
        }