svn commit: r212702 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Wed Sep 15 20:53:20 UTC 2010
Author: tuexen
Date: Wed Sep 15 20:53:20 2010
New Revision: 212702
URL: http://svn.freebsd.org/changeset/base/212702
Log:
* Use !TAILQ_EMPTY() for checking if a tail queue is not empty.
* Remove assignment without any effect.
MFC after: 2 weeks.
Modified:
head/sys/netinet/sctp_cc_functions.c
Modified: head/sys/netinet/sctp_cc_functions.c
==============================================================================
--- head/sys/netinet/sctp_cc_functions.c Wed Sep 15 20:50:51 2010 (r212701)
+++ head/sys/netinet/sctp_cc_functions.c Wed Sep 15 20:53:20 2010 (r212702)
@@ -171,7 +171,7 @@ sctp_cwnd_update_after_sack(struct sctp_
* So, first of all do we need to have a Early FR
* timer running?
*/
- if (((TAILQ_FIRST(&asoc->sent_queue)) &&
+ if ((!TAILQ_EMPTY(&asoc->sent_queue) &&
(net->ref_count > 1) &&
(net->flight_size < net->cwnd)) ||
(reneged_all)) {
@@ -656,7 +656,6 @@ sctp_hs_cwnd_decrease(struct sctp_tcb *s
int old_cwnd = net->cwnd;
cur_val = net->cwnd >> 10;
- indx = net->last_hs_used;
if (cur_val < sctp_cwnd_adjust[0].cwnd) {
/* normal mode */
net->ssthresh = net->cwnd / 2;
@@ -793,7 +792,7 @@ sctp_hs_cwnd_update_after_sack(struct sc
* So, first of all do we need to have a Early FR
* timer running?
*/
- if (((TAILQ_FIRST(&asoc->sent_queue)) &&
+ if ((!TAILQ_EMPTY(&asoc->sent_queue) &&
(net->ref_count > 1) &&
(net->flight_size < net->cwnd)) ||
(reneged_all)) {
@@ -1279,7 +1278,7 @@ sctp_htcp_cwnd_update_after_sack(struct
* So, first of all do we need to have a Early FR
* timer running?
*/
- if (((TAILQ_FIRST(&asoc->sent_queue)) &&
+ if ((!TAILQ_EMPTY(&asoc->sent_queue) &&
(net->ref_count > 1) &&
(net->flight_size < net->cwnd)) ||
(reneged_all)) {
More information about the svn-src-head
mailing list