summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2022-02-11 07:28:30 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2022-02-11 07:28:30 +0000
commitd3a01e3fe60e8901828b0ea2944217cdcb9ae50d (patch)
treec61f6312ff518a162ec6f7a4a7fcc19f009a177b
parent3f1cee6a1fdf2a7bdcb41c9eb5472a719c4c1886 (diff)
Replace manual !klist_empty()+knote() with KNOTE().
OK mpi@
-rw-r--r--sys/net/bpf.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 14b631959a9..ce0fa81de22 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.211 2022/02/05 04:08:27 dlg Exp $ */
+/* $OpenBSD: bpf.c,v 1.212 2022/02/11 07:28:29 visa Exp $ */
/* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */
/*
@@ -580,16 +580,12 @@ out:
void
bpf_wakeup(struct bpf_d *d)
{
- struct klist *klist;
-
MUTEX_ASSERT_LOCKED(&d->bd_mtx);
if (d->bd_nreaders)
wakeup(d);
- klist = &d->bd_sel.si_note;
- if (!klist_empty(klist))
- knote(klist, 0);
+ KNOTE(&d->bd_sel.si_note, 0);
/*
* As long as pgsigio() and selwakeup() need to be protected