summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_sysctl.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2017-08-11 21:24:19 +0000
committermpi <mpi@openbsd.org>2017-08-11 21:24:19 +0000
commitaa28b9a6d024fc39940a8bf6e59c28dbaafc6950 (patch)
treead38cdfb637269384ad7ff4acea0c6e8e71932a7 /sys/kern/kern_sysctl.c
parentBe consistent with goto labels, failure flag and use of FAIL macro. (diff)
downloadwireguard-openbsd-aa28b9a6d024fc39940a8bf6e59c28dbaafc6950.tar.xz
wireguard-openbsd-aa28b9a6d024fc39940a8bf6e59c28dbaafc6950.zip
Remove NET_LOCK()'s argument.
Tested by Hrvoje Popovski, ok bluhm@
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r--sys/kern/kern_sysctl.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index 7b71ccfde26..ae07c12e8e9 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sysctl.c,v 1.329 2017/06/20 14:11:46 gerhard Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.330 2017/08/11 21:24:19 mpi Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
@@ -1302,9 +1302,8 @@ sysctl_file(int *name, u_int namelen, char *where, size_t *sizep,
extern struct inpcbtable rawin6pcbtable;
#endif
struct inpcb *inp;
- int s;
- NET_LOCK(s);
+ NET_LOCK();
TAILQ_FOREACH(inp, &tcbtable.inpt_queue, inp_queue)
FILLSO(inp->inp_socket);
TAILQ_FOREACH(inp, &udbtable.inpt_queue, inp_queue)
@@ -1316,7 +1315,7 @@ sysctl_file(int *name, u_int namelen, char *where, size_t *sizep,
inp_queue)
FILLSO(inp->inp_socket);
#endif
- NET_UNLOCK(s);
+ NET_UNLOCK();
}
fp = LIST_FIRST(&filehead);
/* don't FREF when f_count == 0 to avoid race in fdrop() */