Netdev List
 help / color / mirror / Atom feed
From: Wang Weidong <wangweidong1@huawei.com>
To: <vyasevich@gmail.com>, <nhorman@tuxdriver.com>
Cc: <davem@davemloft.net>, <dingtianhong@huawei.com>,
	<linux-sctp@vger.kernel.org>, <netdev@vger.kernel.org>
Subject: [PATCH net-next v2 3/4] sctp: convert sctp_peer_needs_update to boolean
Date: Fri, 8 Nov 2013 14:17:50 +0800	[thread overview]
Message-ID: <1383891471-20892-4-git-send-email-wangweidong1@huawei.com> (raw)
In-Reply-To: <1383891471-20892-1-git-send-email-wangweidong1@huawei.com>

sctp_peer_needs_update only return 0 or 1.

Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
---
 net/sctp/associola.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 98acb47..8dab0bf 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -1349,7 +1349,7 @@ void sctp_assoc_sync_pmtu(struct sock *sk, struct sctp_association *asoc)
 }
 
 /* Should we send a SACK to update our peer? */
-static inline int sctp_peer_needs_update(struct sctp_association *asoc)
+static inline bool sctp_peer_needs_update(struct sctp_association *asoc)
 {
 	struct net *net = sock_net(asoc->base.sk);
 	switch (asoc->state) {
@@ -1361,12 +1361,12 @@ static inline int sctp_peer_needs_update(struct sctp_association *asoc)
 		    ((asoc->rwnd - asoc->a_rwnd) >= max_t(__u32,
 			   (asoc->base.sk->sk_rcvbuf >> net->sctp.rwnd_upd_shift),
 			   asoc->pathmtu)))
-			return 1;
+			return true;
 		break;
 	default:
 		break;
 	}
-	return 0;
+	return false;
 }
 
 /* Increase asoc's rwnd by len and send any window update SACK if needed. */
-- 
1.7.12

  parent reply	other threads:[~2013-11-08  6:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-08  6:17 [PATCH net-next v2 0/4] sctp: do some clean ups Wang Weidong
2013-11-08  6:17 ` [PATCH net-next v2 1/4] sctp: remove the duplicate initialize Wang Weidong
2013-11-08  6:17 ` [PATCH net-next v2 2/4] sctp: remove the else path Wang Weidong
2013-11-08  6:17 ` Wang Weidong [this message]
2013-11-08  6:17 ` [PATCH net-next v2 4/4] sctp: fix some comments in associola.c Wang Weidong
2013-11-08 12:31 ` [PATCH net-next v2 0/4] sctp: do some clean ups Neil Horman

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=1383891471-20892-4-git-send-email-wangweidong1@huawei.com \
    --to=wangweidong1@huawei.com \
    --cc=davem@davemloft.net \
    --cc=dingtianhong@huawei.com \
    --cc=linux-sctp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=vyasevich@gmail.com \
    /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