From owner-svn-src-head@freebsd.org Fri Aug 24 10:50:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6D5D10869E7; Fri, 24 Aug 2018 10:50:20 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7375D814AB; Fri, 24 Aug 2018 10:50:20 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50709100B0; Fri, 24 Aug 2018 10:50:20 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7OAoKtv082844; Fri, 24 Aug 2018 10:50:20 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7OAoK0G082843; Fri, 24 Aug 2018 10:50:20 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201808241050.w7OAoK0G082843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 24 Aug 2018 10:50:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338291 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 338291 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2018 10:50:21 -0000 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);