diff options
author | Eric Dumazet <edumazet@google.com> | 2012-05-18 08:14:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-18 02:24:13 -0400 |
commit | 92113bfde2f0982daa5a372d67b62f3d55bbc88a (patch) | |
tree | b5170e0f77f259c231cd105d7035203f1fa0bc1f /net/ipv6/af_inet6.c | |
parent | cbc264cacd08e51fd4a64b5d5b1ba48f523990d1 (diff) | |
download | linux-92113bfde2f0982daa5a372d67b62f3d55bbc88a.tar.gz linux-92113bfde2f0982daa5a372d67b62f3d55bbc88a.tar.bz2 linux-92113bfde2f0982daa5a372d67b62f3d55bbc88a.zip |
ipv6: bool conversions phase1
ipv6_opt_accepted() returns a bool, and can use const pointers
ipv6_addr_equal(), ipv6_addr_any(), ipv6_addr_loopback(),
ipv6_addr_orchid() return a bool.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r-- | net/ipv6/af_inet6.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 138d4986c327..e22e6d88bac6 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c @@ -678,10 +678,10 @@ int inet6_sk_rebuild_header(struct sock *sk) } EXPORT_SYMBOL_GPL(inet6_sk_rebuild_header); -int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb) +bool ipv6_opt_accepted(const struct sock *sk, const struct sk_buff *skb) { - struct ipv6_pinfo *np = inet6_sk(sk); - struct inet6_skb_parm *opt = IP6CB(skb); + const struct ipv6_pinfo *np = inet6_sk(sk); + const struct inet6_skb_parm *opt = IP6CB(skb); if (np->rxopt.all) { if ((opt->hop && (np->rxopt.bits.hopopts || @@ -693,9 +693,9 @@ int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb) np->rxopt.bits.osrcrt)) || ((opt->dst1 || opt->dst0) && (np->rxopt.bits.dstopts || np->rxopt.bits.odstopts))) - return 1; + return true; } - return 0; + return false; } EXPORT_SYMBOL_GPL(ipv6_opt_accepted); |