[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1444310942-4428-6-git-send-email-bywxiaobai@163.com>
Date: Thu, 8 Oct 2015 21:28:58 +0800
From: Yaowei Bai <bywxiaobai@....com>
To: davem@...emloft.net, tgraf@...g.ch, herbert@...dor.apana.org.au,
johannes.berg@...el.com, daniel@...earbox.net,
gerrit@....abdn.ac.uk, socketcan@...tkopp.net, mkl@...gutronix.de
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 5/9] 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@....com>
---
include/linux/dccp.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/dccp.h b/include/linux/dccp.h
index 2210254..61d042b 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;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists