diff options
author | 2017-04-02 23:40:08 +0000 | |
---|---|---|
committer | 2017-04-02 23:40:08 +0000 | |
commit | b0b2e38bcd578061f4990bb5cad51bf93590ed21 (patch) | |
tree | e0828d69ff1fffc7f1480df0856835b045b18056 /sys/kern/uipc_socket.c | |
parent | The character buffer should be resized using recallocarray() (diff) | |
download | wireguard-openbsd-b0b2e38bcd578061f4990bb5cad51bf93590ed21.tar.xz wireguard-openbsd-b0b2e38bcd578061f4990bb5cad51bf93590ed21.zip |
Less convoluted code in soshutdown()
ok guenther
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r-- | sys/kern/uipc_socket.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 0d427de67c9..7716e576d7f 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.181 2017/03/17 17:19:16 mpi Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.182 2017/04/02 23:40:08 deraadt Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -1015,10 +1015,10 @@ soshutdown(struct socket *so, int how) s = solock(so); switch (how) { case SHUT_RD: + sorflush(so); + break; case SHUT_RDWR: sorflush(so); - if (how == SHUT_RD) - break; /* FALLTHROUGH */ case SHUT_WR: error = (*pr->pr_usrreq)(so, PRU_SHUTDOWN, NULL, NULL, NULL, |