diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-02-03 16:14:27 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-02-03 16:14:27 +0000 |
commit | b0880fa081e2997781d329dbfcfba179a2541027 (patch) | |
tree | 13b0438d7b97b0f75be7fc947156de48d066f2ac /sys/netinet | |
parent | 4049dd0a6351fa8c35da44be852e4e89a75ed63e (diff) |
Since tcp_attach() has moved to a separate protocol function, the
inp cannot be NULL. Remove the useless if in tcp_usrreq().
OK mpi@
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 4c33de84279..3502c908827 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_usrreq.c,v 1.165 2018/01/23 20:49:58 bluhm Exp $ */ +/* $OpenBSD: tcp_usrreq.c,v 1.166 2018/02/03 16:14:26 bluhm Exp $ */ /* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */ /* @@ -167,17 +167,15 @@ tcp_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, m_freem(m); return (error); } - if (inp) { - tp = intotcpcb(inp); - /* tp might get 0 when using socket splicing */ - if (tp == NULL) - return (0); + tp = intotcpcb(inp); + /* tp might get 0 when using socket splicing */ + if (tp == NULL) + return (0); #ifdef KPROF - tcp_acounts[tp->t_state][req]++; + tcp_acounts[tp->t_state][req]++; #endif - ostate = tp->t_state; - } else - ostate = 0; + ostate = tp->t_state; + switch (req) { /* |