diff options
author | Eric Dumazet <edumazet@google.com> | 2012-05-18 20:57:34 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-19 07:08:16 +0200 |
commit | a50feda546ac03415707a9bbcac8d6b20714db21 (patch) | |
tree | 3c1f5d64399e713c97545ca39984d4d2efe6ca5d /net/ipv6/anycast.c | |
parent | ipx: Remove spurious NULL checking in ipx_ioctl(). (diff) | |
download | linux-a50feda546ac03415707a9bbcac8d6b20714db21.tar.xz linux-a50feda546ac03415707a9bbcac8d6b20714db21.zip |
ipv6: bool/const conversions phase2
Mostly bool conversions, some inline removals and const additions.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/anycast.c')
-rw-r--r-- | net/ipv6/anycast.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c index db00d27ffb16..cdf02be5f191 100644 --- a/net/ipv6/anycast.c +++ b/net/ipv6/anycast.c @@ -342,7 +342,7 @@ static int ipv6_dev_ac_dec(struct net_device *dev, const struct in6_addr *addr) * check if the interface has this anycast address * called with rcu_read_lock() */ -static int ipv6_chk_acast_dev(struct net_device *dev, const struct in6_addr *addr) +static bool ipv6_chk_acast_dev(struct net_device *dev, const struct in6_addr *addr) { struct inet6_dev *idev; struct ifacaddr6 *aca; @@ -356,16 +356,16 @@ static int ipv6_chk_acast_dev(struct net_device *dev, const struct in6_addr *add read_unlock_bh(&idev->lock); return aca != NULL; } - return 0; + return false; } /* * check if given interface (or any, if dev==0) has this anycast address */ -int ipv6_chk_acast_addr(struct net *net, struct net_device *dev, - const struct in6_addr *addr) +bool ipv6_chk_acast_addr(struct net *net, struct net_device *dev, + const struct in6_addr *addr) { - int found = 0; + bool found = false; rcu_read_lock(); if (dev) @@ -373,7 +373,7 @@ int ipv6_chk_acast_addr(struct net *net, struct net_device *dev, else for_each_netdev_rcu(net, dev) if (ipv6_chk_acast_dev(dev, addr)) { - found = 1; + found = true; break; } rcu_read_unlock(); |