From: bluhm Date: Sat, 3 Feb 2018 16:14:26 +0000 (+0000) Subject: Since tcp_attach() has moved to a separate protocol function, the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=eb3f61bcb16e281598404effbd55a573f2f22ff2;p=openbsd Since tcp_attach() has moved to a separate protocol function, the inp cannot be NULL. Remove the useless if in tcp_usrreq(). OK mpi@ --- 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) { /*