diff options
author | Eric Dumazet <edumazet@google.com> | 2012-05-18 14:57:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-19 01:08:16 -0400 |
commit | a50feda546ac03415707a9bbcac8d6b20714db21 (patch) | |
tree | 3c1f5d64399e713c97545ca39984d4d2efe6ca5d /net/ipv6/addrlabel.c | |
parent | 32e9072b92a1c556a303d8d0e0d64feb667e601d (diff) |
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/addrlabel.c')
-rw-r--r-- | net/ipv6/addrlabel.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c index 95aea16b8b6f..eb6a63632d3c 100644 --- a/net/ipv6/addrlabel.c +++ b/net/ipv6/addrlabel.c | |||
@@ -129,7 +129,7 @@ static void ip6addrlbl_free_rcu(struct rcu_head *h) | |||
129 | ip6addrlbl_free(container_of(h, struct ip6addrlbl_entry, rcu)); | 129 | ip6addrlbl_free(container_of(h, struct ip6addrlbl_entry, rcu)); |
130 | } | 130 | } |
131 | 131 | ||
132 | static inline int ip6addrlbl_hold(struct ip6addrlbl_entry *p) | 132 | static bool ip6addrlbl_hold(struct ip6addrlbl_entry *p) |
133 | { | 133 | { |
134 | return atomic_inc_not_zero(&p->refcnt); | 134 | return atomic_inc_not_zero(&p->refcnt); |
135 | } | 135 | } |
@@ -141,20 +141,20 @@ static inline void ip6addrlbl_put(struct ip6addrlbl_entry *p) | |||
141 | } | 141 | } |
142 | 142 | ||
143 | /* Find label */ | 143 | /* Find label */ |
144 | static int __ip6addrlbl_match(struct net *net, | 144 | static bool __ip6addrlbl_match(struct net *net, |
145 | struct ip6addrlbl_entry *p, | 145 | const struct ip6addrlbl_entry *p, |
146 | const struct in6_addr *addr, | 146 | const struct in6_addr *addr, |
147 | int addrtype, int ifindex) | 147 | int addrtype, int ifindex) |
148 | { | 148 | { |
149 | if (!net_eq(ip6addrlbl_net(p), net)) | 149 | if (!net_eq(ip6addrlbl_net(p), net)) |
150 | return 0; | 150 | return false; |
151 | if (p->ifindex && p->ifindex != ifindex) | 151 | if (p->ifindex && p->ifindex != ifindex) |
152 | return 0; | 152 | return false; |
153 | if (p->addrtype && p->addrtype != addrtype) | 153 | if (p->addrtype && p->addrtype != addrtype) |
154 | return 0; | 154 | return false; |
155 | if (!ipv6_prefix_equal(addr, &p->prefix, p->prefixlen)) | 155 | if (!ipv6_prefix_equal(addr, &p->prefix, p->prefixlen)) |
156 | return 0; | 156 | return false; |
157 | return 1; | 157 | return true; |
158 | } | 158 | } |
159 | 159 | ||
160 | static struct ip6addrlbl_entry *__ipv6_addr_label(struct net *net, | 160 | static struct ip6addrlbl_entry *__ipv6_addr_label(struct net *net, |
@@ -456,8 +456,8 @@ static int ip6addrlbl_newdel(struct sk_buff *skb, struct nlmsghdr *nlh, | |||
456 | return err; | 456 | return err; |
457 | } | 457 | } |
458 | 458 | ||
459 | static inline void ip6addrlbl_putmsg(struct nlmsghdr *nlh, | 459 | static void ip6addrlbl_putmsg(struct nlmsghdr *nlh, |
460 | int prefixlen, int ifindex, u32 lseq) | 460 | int prefixlen, int ifindex, u32 lseq) |
461 | { | 461 | { |
462 | struct ifaddrlblmsg *ifal = nlmsg_data(nlh); | 462 | struct ifaddrlblmsg *ifal = nlmsg_data(nlh); |
463 | ifal->ifal_family = AF_INET6; | 463 | ifal->ifal_family = AF_INET6; |