summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_usrreq.c
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2018-02-03 16:14:26 +0000
committerbluhm <bluhm@openbsd.org>2018-02-03 16:14:26 +0000
commiteb3f61bcb16e281598404effbd55a573f2f22ff2 (patch)
treeb36ba966281b11d3199f4190a1650c458b9ee475 /sys/netinet/tcp_usrreq.c
parentThe recover script should have the same sanity checks as recover.c. (diff)
downloadwireguard-openbsd-eb3f61bcb16e281598404effbd55a573f2f22ff2.tar.xz
wireguard-openbsd-eb3f61bcb16e281598404effbd55a573f2f22ff2.zip
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/tcp_usrreq.c')
-rw-r--r--sys/netinet/tcp_usrreq.c18
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) {
/*