summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_cc_functions.c
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2010-09-15 20:53:20 +0000
committertuexen <tuexen@FreeBSD.org>2010-09-15 20:53:20 +0000
commit1b9af662a685b7bc3f4ac99fa99ba49ca15c825d (patch)
treeb357eec06179fa709f302f9591e1fd1cd3744605 /sys/netinet/sctp_cc_functions.c
parent3f139046bf00a56f3228ed3782e84c36f7cc6e44 (diff)
downloadFreeBSD-src-1b9af662a685b7bc3f4ac99fa99ba49ca15c825d.zip
FreeBSD-src-1b9af662a685b7bc3f4ac99fa99ba49ca15c825d.tar.gz
* Use !TAILQ_EMPTY() for checking if a tail queue is not empty.
* Remove assignment without any effect. MFC after: 2 weeks.
Diffstat (limited to 'sys/netinet/sctp_cc_functions.c')
-rw-r--r--sys/netinet/sctp_cc_functions.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netinet/sctp_cc_functions.c b/sys/netinet/sctp_cc_functions.c
index 1cba25a..8d2afc6 100644
--- a/sys/netinet/sctp_cc_functions.c
+++ b/sys/netinet/sctp_cc_functions.c
@@ -171,7 +171,7 @@ sctp_cwnd_update_after_sack(struct sctp_tcb *stcb,
* 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 *stcb, struct sctp_nets *net)
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 sctp_tcb *stcb,
* 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 sctp_tcb *stcb,
* 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)) {
OpenPOWER on IntegriCloud