summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorYaowei Bai <bywxiaobai@163.com>2015-10-08 21:28:59 +0800
committerDavid S. Miller <davem@davemloft.net>2015-10-09 07:49:03 -0700
commit45ae74f56162e7a017c3a4e130cf1bcd8d2d17cc (patch)
treefd8f566bbec6c44ed81be8b0078c621b206f1771 /net
parent0c6119d99bf5df9403a688d267537284e9cc8bcb (diff)
downloadlinux-45ae74f56162e7a017c3a4e130cf1bcd8d2d17cc.tar.bz2
net/dccp: dccp_bad_service_code can be boolean
This patch makes dccp_bad_service_code return bool due to these particular functions only using either one or zero as their return value. dccp_list_has_service is also been made return bool in this patchset. No functional change. Signed-off-by: Yaowei Bai <bywxiaobai@163.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/dccp/dccp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index e1f823451565..923f5a180134 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -325,13 +325,13 @@ void dccp_send_close(struct sock *sk, const int active);
int dccp_invalid_packet(struct sk_buff *skb);
u32 dccp_sample_rtt(struct sock *sk, long delta);
-static inline int dccp_bad_service_code(const struct sock *sk,
+static inline bool dccp_bad_service_code(const struct sock *sk,
const __be32 service)
{
const struct dccp_sock *dp = dccp_sk(sk);
if (dp->dccps_service == service)
- return 0;
+ return false;
return !dccp_list_has_service(dp->dccps_service_list, service);
}