diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2006-10-19 00:50:09 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:22:06 -0500 |
commit | 40aa7b90a9b41a2162c829fd6cd34a09056a7ddb (patch) | |
tree | 398eabbb956a12d80c46b508d18d6e528a89d119 /net | |
parent | 33e93c9699981024cc99fb23a0545fb19d23847d (diff) |
[IPV6] ROUTE: Use &rt->u.dst instead of cast.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/fib6_rules.c | 2 | ||||
-rw-r--r-- | net/ipv6/route.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index 8377477b2c19..25804cb69cf0 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c | |||
@@ -63,7 +63,7 @@ struct dst_entry *fib6_rule_lookup(struct flowi *fl, int flags, | |||
63 | fib_rule_put(arg.rule); | 63 | fib_rule_put(arg.rule); |
64 | 64 | ||
65 | if (arg.result) | 65 | if (arg.result) |
66 | return (struct dst_entry *) arg.result; | 66 | return arg.result; |
67 | 67 | ||
68 | dst_hold(&ip6_null_entry.u.dst); | 68 | dst_hold(&ip6_null_entry.u.dst); |
69 | return &ip6_null_entry.u.dst; | 69 | return &ip6_null_entry.u.dst; |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index c86ee3adddcc..eb78b5252248 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -940,7 +940,7 @@ struct dst_entry *ndisc_dst_alloc(struct net_device *dev, | |||
940 | fib6_force_start_gc(); | 940 | fib6_force_start_gc(); |
941 | 941 | ||
942 | out: | 942 | out: |
943 | return (struct dst_entry *)rt; | 943 | return &rt->u.dst; |
944 | } | 944 | } |
945 | 945 | ||
946 | int ndisc_dst_gc(int *more) | 946 | int ndisc_dst_gc(int *more) |
@@ -1223,7 +1223,7 @@ out: | |||
1223 | if (idev) | 1223 | if (idev) |
1224 | in6_dev_put(idev); | 1224 | in6_dev_put(idev); |
1225 | if (rt) | 1225 | if (rt) |
1226 | dst_free((struct dst_entry *) rt); | 1226 | dst_free(&rt->u.dst); |
1227 | return err; | 1227 | return err; |
1228 | } | 1228 | } |
1229 | 1229 | ||
@@ -1822,7 +1822,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, | |||
1822 | rt->rt6i_flags |= RTF_LOCAL; | 1822 | rt->rt6i_flags |= RTF_LOCAL; |
1823 | rt->rt6i_nexthop = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_gateway); | 1823 | rt->rt6i_nexthop = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_gateway); |
1824 | if (rt->rt6i_nexthop == NULL) { | 1824 | if (rt->rt6i_nexthop == NULL) { |
1825 | dst_free((struct dst_entry *) rt); | 1825 | dst_free(&rt->u.dst); |
1826 | return ERR_PTR(-ENOMEM); | 1826 | return ERR_PTR(-ENOMEM); |
1827 | } | 1827 | } |
1828 | 1828 | ||