diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2018-08-09 15:02:46 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2018-08-09 15:02:46 +0000 |
commit | c42adafe64a68232b312a3f205ea2e0a6585b064 (patch) | |
tree | 20cfc1c77cce294064ec17ab522fbee90167f383 /sys/kern/kern_event.c | |
parent | c5ef0cd2b94def61fd35a5c339874acf038bccf3 (diff) |
Remove redundant "kq == kn->kn_kq" checks. The lists kq_knhash and
kq_knlist are dedicated to a single kqueue instance, which makes
the filtering by kn_kq unnecessary.
OK kettenis@, mpi@
Diffstat (limited to 'sys/kern/kern_event.c')
-rw-r--r-- | sys/kern/kern_event.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 8ee92e8d60d..c141f2ac729 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_event.c,v 1.95 2018/08/07 12:38:15 visa Exp $ */ +/* $OpenBSD: kern_event.c,v 1.96 2018/08/09 15:02:45 visa Exp $ */ /*- * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org> @@ -590,8 +590,7 @@ kqueue_register(struct kqueue *kq, struct kevent *kev, struct proc *p) if (kev->ident < kq->kq_knlistsize) { SLIST_FOREACH(kn, &kq->kq_knlist[kev->ident], kn_link) { - if (kq == kn->kn_kq && - kev->filter == kn->kn_filter) + if (kev->filter == kn->kn_filter) break; } } @@ -603,7 +602,6 @@ kqueue_register(struct kqueue *kq, struct kevent *kev, struct proc *p) KN_HASH((u_long)kev->ident, kq->kq_knhashmask)]; SLIST_FOREACH(kn, list, kn_link) { if (kev->ident == kn->kn_id && - kq == kn->kn_kq && kev->filter == kn->kn_filter) break; } |