summaryrefslogtreecommitdiff
path: root/include/linux/dccp.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-10-09 17:49:08 +0300
committerDavid S. Miller <davem@davemloft.net>2015-10-09 17:49:08 +0300
commit4d886d65ed89f2572727c354162341a4c106a963 (patch)
treee6fd3232b0e38cac01154eada278a18bcb234ca2 /include/linux/dccp.h
parent8cec75bd85cc26f81e85eb20e863cc564d354113 (diff)
parent0cbf334376d5e82d7a2f5cd234ca4f5d0843f3ea (diff)
downloadlinux-4d886d65ed89f2572727c354162341a4c106a963.tar.xz
Merge branch 'net-bool'
Yaowei Bai says: ==================== net: small improvement This patchset makes several functions in net return bool to improve readability and/or simplicity because these functions only use one or zero as their return value. No functional changes. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/dccp.h')
-rw-r--r--include/linux/dccp.h6
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;