netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yaowei Bai <bywxiaobai@163.com>
To: davem@davemloft.net, tgraf@suug.ch, herbert@gondor.apana.org.au,
	johannes.berg@intel.com, daniel@iogearbox.net,
	gerrit@erg.abdn.ac.uk, socketcan@hartkopp.net,
	mkl@pengutronix.de
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 5/9] net/dccp: dccp_list_has_service can be boolean
Date: Thu,  8 Oct 2015 21:28:58 +0800	[thread overview]
Message-ID: <1444310942-4428-6-git-send-email-bywxiaobai@163.com> (raw)
In-Reply-To: <1444310942-4428-1-git-send-email-bywxiaobai@163.com>

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

  parent reply	other threads:[~2015-10-08 13:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-08 13:28 [PATCH 0/9] net: small improvement Yaowei Bai
2015-10-08 13:28 ` [PATCH 1/9] net/netlink: lockdep_genl_is_held can be boolean Yaowei Bai
2015-10-08 13:28 ` [PATCH 2/9] net/ieee80211: ieee80211_is_* " Yaowei Bai
2015-10-08 13:28 ` [PATCH 3/9] net/nfnetlink: lockdep_nfnl_is_held " Yaowei Bai
2015-10-08 13:28 ` [PATCH 4/9] net/can: can_dropped_invalid_skb " Yaowei Bai
2015-10-09 10:14   ` Marc Kleine-Budde
2015-10-09 14:25     ` Yaowei Bai
2015-10-12  9:00       ` Marc Kleine-Budde
2015-10-08 13:28 ` Yaowei Bai [this message]
2015-10-08 13:28 ` [PATCH 6/9] net/dccp: dccp_bad_service_code " Yaowei Bai
2015-10-08 13:29 ` [PATCH 7/9] net/inetdevice: inet_ifa_match " Yaowei Bai
2015-10-08 13:29 ` [PATCH 8/9] net/inetdevice: bad_mask " Yaowei Bai
2015-10-08 13:29 ` [PATCH 9/9] net/core: lockdep_rtnl_is_held " Yaowei Bai
2015-10-09 14:49 ` [PATCH 0/9] net: small improvement David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1444310942-4428-6-git-send-email-bywxiaobai@163.com \
    --to=bywxiaobai@163.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=gerrit@erg.abdn.ac.uk \
    --cc=herbert@gondor.apana.org.au \
    --cc=johannes.berg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=socketcan@hartkopp.net \
    --cc=tgraf@suug.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).