Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1242367
| From | Yaowei Bai <bywxiaobai@163.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 6/9] net/dccp: dccp_bad_service_code can be boolean |
| Date | 2015-10-08 15:50 +0200 |
| Message-ID | <qhjK2-58q-7@gated-at.bofh.it> (permalink) |
| References | <qhjAl-4X0-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
---
net/dccp/dccp.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index bebc735..a250825 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);
}
--
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