Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Aug 2018 10:50:20 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r338291 - head/sys/netinet
Message-ID:  <201808241050.w7OAoK0G082843@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Fri Aug 24 10:50:19 2018
New Revision: 338291
URL: https://svnweb.freebsd.org/changeset/base/338291

Log:
  Fix a shadowed variable warning.
  Thanks to Peter Lei for reporting the issue.
  
  Approved by:		re(kib@)
  MFH:			1 month
  Sponsored by:		Netflix, Inc.

Modified:
  head/sys/netinet/tcp_usrreq.c

Modified: head/sys/netinet/tcp_usrreq.c
==============================================================================
--- head/sys/netinet/tcp_usrreq.c	Fri Aug 24 02:23:25 2018	(r338290)
+++ head/sys/netinet/tcp_usrreq.c	Fri Aug 24 10:50:19 2018	(r338291)
@@ -1662,7 +1662,6 @@ tcp_ctloutput(struct socket *so, struct sockopt *sopt)
 			return (0);
 		}
 		if (tp->t_state != TCPS_CLOSED) {
-			int error=EINVAL;
 			/* 
 			 * The user has advanced the state
 			 * past the initial point, we may not
@@ -1675,7 +1674,8 @@ tcp_ctloutput(struct socket *so, struct sockopt *sopt)
 				 * still be possible?
 				 */
 				error = (*blk->tfb_tcp_handoff_ok)(tp);
-			}
+			} else
+				error = EINVAL;
 			if (error) {
 				refcount_release(&blk->tfb_refcnt);
 				INP_WUNLOCK(inp);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808241050.w7OAoK0G082843>