svn commit: r214473 - stable/8/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Thu Oct 28 18:57:17 UTC 2010


Author: tuexen
Date: Thu Oct 28 18:57:16 2010
New Revision: 214473
URL: http://svn.freebsd.org/changeset/base/214473

Log:
  MFC r212702:
  * Use !TAILQ_EMPTY() for checking if a tail queue is not empty.
  * Remove assignment without any effect.

Modified:
  stable/8/sys/netinet/sctp_cc_functions.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/netinet/sctp_cc_functions.c
==============================================================================
--- stable/8/sys/netinet/sctp_cc_functions.c	Thu Oct 28 18:55:29 2010	(r214472)
+++ stable/8/sys/netinet/sctp_cc_functions.c	Thu Oct 28 18:57:16 2010	(r214473)
@@ -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-all mailing list