net: sock_flag() cleanup

- sock_flag() accepts a const pointer

- sock_flag() returns a boolean

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Eric Dumazet 2012-05-16 05:57:07 +00:00 committed by David S. Miller
commit 1b23a5dfc2
2 changed files with 8 additions and 8 deletions

View file

@ -650,7 +650,7 @@ static inline void sock_reset_flag(struct sock *sk, enum sock_flags flag)
__clear_bit(flag, &sk->sk_flags);
}
static inline int sock_flag(struct sock *sk, enum sock_flags flag)
static inline bool sock_flag(const struct sock *sk, enum sock_flags flag)
{
return test_bit(flag, &sk->sk_flags);
}