diff options
author | Yaowei Bai <bywxiaobai@163.com> | 2015-10-08 16:28:58 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-09 17:49:02 +0300 |
commit | 0c6119d99bf5df9403a688d267537284e9cc8bcb (patch) | |
tree | 935a1f2379eaa3f2c35429042a692c4a7f4df8d5 /include/linux/dccp.h | |
parent | d6fbaea5f635216c9861587c4e658086cf3b1b6b (diff) | |
download | linux-0c6119d99bf5df9403a688d267537284e9cc8bcb.tar.xz |
net/dccp: dccp_list_has_service can be boolean
This patch makes dccp_list_has_service return bool due to this
particular function only using either one or zero as its return
value.
No functional change.
Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/dccp.h')
-rw-r--r-- | include/linux/dccp.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/dccp.h b/include/linux/dccp.h index 221025423e6c..61d042bbbf60 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h @@ -202,16 +202,16 @@ struct dccp_service_list { #define DCCP_SERVICE_INVALID_VALUE htonl((__u32)-1) #define DCCP_SERVICE_CODE_IS_ABSENT 0 -static inline int dccp_list_has_service(const struct dccp_service_list *sl, +static inline bool dccp_list_has_service(const struct dccp_service_list *sl, const __be32 service) { if (likely(sl != NULL)) { u32 i = sl->dccpsl_nr; while (i--) if (sl->dccpsl_list[i] == service) - return 1; + return true; } - return 0; + return false; } struct dccp_ackvec; |