diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2009-03-21 13:36:17 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-21 13:36:17 -0700 |
commit | a0bffffc148cd8e75a48a89ad2ddb74e4081a20a (patch) | |
tree | 3a4d350d65d88bb1df8906b4822af2350ceb1cfc /net/ipv6 | |
parent | a3ac80a130300573de351083cf4a5b46d233e8bf (diff) | |
download | linux-a0bffffc148cd8e75a48a89ad2ddb74e4081a20a.tar.gz linux-a0bffffc148cd8e75a48a89ad2ddb74e4081a20a.tar.bz2 linux-a0bffffc148cd8e75a48a89ad2ddb74e4081a20a.zip |
net/*: use linux/kernel.h swap()
tcp_sack_swap seems unnecessary so I pushed swap to the caller.
Also removed comment that seemed then pointless, and added include
when not already there. Compile tested.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/addrconf.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 717584bad02e..8499da9e76a2 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -40,6 +40,7 @@ #include <linux/errno.h> #include <linux/types.h> +#include <linux/kernel.h> #include <linux/socket.h> #include <linux/sockios.h> #include <linux/net.h> @@ -1215,16 +1216,12 @@ int ipv6_dev_get_saddr(struct net *net, struct net_device *dst_dev, } break; } else if (minihiscore < miniscore) { - struct ipv6_saddr_score *tmp; - if (hiscore->ifa) in6_ifa_put(hiscore->ifa); in6_ifa_hold(score->ifa); - tmp = hiscore; - hiscore = score; - score = tmp; + swap(hiscore, score); /* restore our iterator */ score->ifa = hiscore->ifa; |