netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ipv6: fib6_ifdown cleanup
@ 2010-12-17  3:42 Stephen Hemminger
  2010-12-19  6:02 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2010-12-17  3:42 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

Remove (unnecessary) casts to make code cleaner.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--- a/net/ipv6/route.c	2010-12-16 15:09:42.336361755 -0800
+++ b/net/ipv6/route.c	2010-12-16 17:50:27.997984246 -0800
@@ -2004,11 +2004,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;
 	}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] ipv6: fib6_ifdown cleanup
  2010-12-17  3:42 [PATCH net-next] ipv6: fib6_ifdown cleanup Stephen Hemminger
@ 2010-12-19  6:02 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-12-19  6:02 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Thu, 16 Dec 2010 19:42:40 -0800

> Remove (unnecessary) casts to make code cleaner.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-19  6:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-17  3:42 [PATCH net-next] ipv6: fib6_ifdown cleanup Stephen Hemminger
2010-12-19  6:02 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).