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);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to