]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/ipv6/addrconf.c
net/*: use linux/kernel.h swap()
[net-next-2.6.git] / net / ipv6 / addrconf.c
index 717584bad02ec76b086e4e00c079b50b25610ed6..8499da9e76a22a742afcd77621c547d47ee41c26 100644 (file)
@@ -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;