浏览代码

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>
Yaowei Bai 9 年之前
父节点
当前提交
0c6119d99b
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      include/linux/dccp.h

+ 3 - 3
include/linux/dccp.h

@@ -202,16 +202,16 @@ struct dccp_service_list {
 #define DCCP_SERVICE_INVALID_VALUE htonl((__u32)-1)
 #define DCCP_SERVICE_INVALID_VALUE htonl((__u32)-1)
 #define DCCP_SERVICE_CODE_IS_ABSENT		0
 #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)
 					const __be32 service)
 {
 {
 	if (likely(sl != NULL)) {
 	if (likely(sl != NULL)) {
 		u32 i = sl->dccpsl_nr;
 		u32 i = sl->dccpsl_nr;
 		while (i--)
 		while (i--)
 			if (sl->dccpsl_list[i] == service)
 			if (sl->dccpsl_list[i] == service)
-				return 1;
+				return true;
 	}
 	}
-	return 0;
+	return false;
 }
 }
 
 
 struct dccp_ackvec;
 struct dccp_ackvec;