Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1242347
| From | Yaowei Bai <bywxiaobai@163.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 5/9] net/dccp: dccp_list_has_service can be boolean |
| Date | 2015-10-08 15:40 +0200 |
| Message-ID | <qhjAm-4X0-9@gated-at.bofh.it> (permalink) |
| References | <qhjAl-4X0-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
---
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/9] net: small improvement Yaowei Bai <bywxiaobai@163.com> - 2015-10-08 15:40 +0200
[PATCH 5/9] net/dccp: dccp_list_has_service can be boolean Yaowei Bai <bywxiaobai@163.com> - 2015-10-08 15:40 +0200
[PATCH 3/9] net/nfnetlink: lockdep_nfnl_is_held can be boolean Yaowei Bai <bywxiaobai@163.com> - 2015-10-08 15:40 +0200
[PATCH 7/9] net/inetdevice: inet_ifa_match can be boolean Yaowei Bai <bywxiaobai@163.com> - 2015-10-08 15:40 +0200
[PATCH 1/9] net/netlink: lockdep_genl_is_held can be boolean Yaowei Bai <bywxiaobai@163.com> - 2015-10-08 15:40 +0200
[PATCH 4/9] net/can: can_dropped_invalid_skb can be boolean Yaowei Bai <bywxiaobai@163.com> - 2015-10-08 15:40 +0200
Re: [PATCH 4/9] net/can: can_dropped_invalid_skb can be boolean Marc Kleine-Budde <mkl@pengutronix.de> - 2015-10-09 12:20 +0200
Re: [PATCH 4/9] net/can: can_dropped_invalid_skb can be boolean Yaowei Bai <bywxiaobai@163.com> - 2015-10-09 16:30 +0200
Re: [PATCH 4/9] net/can: can_dropped_invalid_skb can be boolean Marc Kleine-Budde <mkl@pengutronix.de> - 2015-10-12 11:10 +0200
[PATCH 2/9] net/ieee80211: ieee80211_is_* can be boolean Yaowei Bai <bywxiaobai@163.com> - 2015-10-08 15:40 +0200
[PATCH 6/9] net/dccp: dccp_bad_service_code can be boolean Yaowei Bai <bywxiaobai@163.com> - 2015-10-08 15:50 +0200
[PATCH 8/9] net/inetdevice: bad_mask can be boolean Yaowei Bai <bywxiaobai@163.com> - 2015-10-08 15:50 +0200
[PATCH 9/9] net/core: lockdep_rtnl_is_held can be boolean Yaowei Bai <bywxiaobai@163.com> - 2015-10-08 15:50 +0200
Re: [PATCH 0/9] net: small improvement David Miller <davem@davemloft.net> - 2015-10-09 16:40 +0200
csiph-web