mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-07 15:18:15 +00:00
net/dccp: dccp_bad_service_code can be boolean
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> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0c6119d99b
commit
45ae74f561
1 changed files with 2 additions and 2 deletions
|
@ -325,13 +325,13 @@ void dccp_send_close(struct sock *sk, const int active);
|
||||||
int dccp_invalid_packet(struct sk_buff *skb);
|
int dccp_invalid_packet(struct sk_buff *skb);
|
||||||
u32 dccp_sample_rtt(struct sock *sk, long delta);
|
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 __be32 service)
|
||||||
{
|
{
|
||||||
const struct dccp_sock *dp = dccp_sk(sk);
|
const struct dccp_sock *dp = dccp_sk(sk);
|
||||||
|
|
||||||
if (dp->dccps_service == service)
|
if (dp->dccps_service == service)
|
||||||
return 0;
|
return false;
|
||||||
return !dccp_list_has_service(dp->dccps_service_list, service);
|
return !dccp_list_has_service(dp->dccps_service_list, service);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue