svn commit: r194305 - head/sys/netinet

John Baldwin jhb at FreeBSD.org
Tue Jun 16 19:00:49 UTC 2009


Author: jhb
Date: Tue Jun 16 19:00:48 2009
New Revision: 194305
URL: http://svn.freebsd.org/changeset/base/194305

Log:
  Trim extra sets of ()'s.
  
  Requested by:	bde

Modified:
  head/sys/netinet/tcp_output.c
  head/sys/netinet/tcp_timer.c

Modified: head/sys/netinet/tcp_output.c
==============================================================================
--- head/sys/netinet/tcp_output.c	Tue Jun 16 19:00:12 2009	(r194304)
+++ head/sys/netinet/tcp_output.c	Tue Jun 16 19:00:48 2009	(r194305)
@@ -172,7 +172,7 @@ tcp_output(struct tcpcb *tp)
 	 * to send, then transmit; otherwise, investigate further.
 	 */
 	idle = (tp->t_flags & TF_LASTIDLE) || (tp->snd_max == tp->snd_una);
-	if (idle && (ticks - tp->t_rcvtime) >= tp->t_rxtcur) {
+	if (idle && ticks - tp->t_rcvtime >= tp->t_rxtcur) {
 		/*
 		 * We have been idle for "a while" and no acks are
 		 * expected to clock out any data we send --

Modified: head/sys/netinet/tcp_timer.c
==============================================================================
--- head/sys/netinet/tcp_timer.c	Tue Jun 16 19:00:12 2009	(r194304)
+++ head/sys/netinet/tcp_timer.c	Tue Jun 16 19:00:48 2009	(r194305)
@@ -254,7 +254,7 @@ tcp_timer_2msl(void *xtp)
 		tp = tcp_close(tp);             
 	} else {
 		if (tp->t_state != TCPS_TIME_WAIT &&
-		   (ticks - tp->t_rcvtime) <= tcp_maxidle)
+		   ticks - tp->t_rcvtime <= tcp_maxidle)
 		       callout_reset(&tp->t_timers->tt_2msl, tcp_keepintvl,
 				     tcp_timer_2msl, tp);
 	       else
@@ -318,7 +318,7 @@ tcp_timer_keep(void *xtp)
 		goto dropit;
 	if ((always_keepalive || inp->inp_socket->so_options & SO_KEEPALIVE) &&
 	    tp->t_state <= TCPS_CLOSING) {
-		if ((ticks - tp->t_rcvtime) >= tcp_keepidle + tcp_maxidle)
+		if (ticks - tp->t_rcvtime >= tcp_keepidle + tcp_maxidle)
 			goto dropit;
 		/*
 		 * Send a packet designed to force a response
@@ -418,8 +418,8 @@ tcp_timer_persist(void *xtp)
 	 * backoff that we would use if retransmitting.
 	 */
 	if (tp->t_rxtshift == TCP_MAXRXTSHIFT &&
-	    ((ticks - tp->t_rcvtime) >= tcp_maxpersistidle ||
-	     (ticks - tp->t_rcvtime) >= TCP_REXMTVAL(tp) * tcp_totbackoff)) {
+	    (ticks - tp->t_rcvtime >= tcp_maxpersistidle ||
+	     ticks - tp->t_rcvtime >= TCP_REXMTVAL(tp) * tcp_totbackoff)) {
 		TCPSTAT_INC(tcps_persistdrop);
 		tp = tcp_drop(tp, ETIMEDOUT);
 		goto out;


More information about the svn-src-head mailing list