diff options
author | anton <anton@cvs.openbsd.org> | 2019-12-24 11:42:35 +0000 |
---|---|---|
committer | anton <anton@cvs.openbsd.org> | 2019-12-24 11:42:35 +0000 |
commit | dfbc93664b07efd4a4184b508cdfbb59064315c2 (patch) | |
tree | b869cad910a13c8e8e409ec875c2925d572777a7 /regress | |
parent | ff288ea53cfaae71d9c77fc713dda3923a3f84f7 (diff) |
simplify assertions
Diffstat (limited to 'regress')
-rw-r--r-- | regress/sys/kern/pipe/test-kqueue.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/regress/sys/kern/pipe/test-kqueue.c b/regress/sys/kern/pipe/test-kqueue.c index 3fdc5f6265c..e7da8c6eccf 100644 --- a/regress/sys/kern/pipe/test-kqueue.c +++ b/regress/sys/kern/pipe/test-kqueue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: test-kqueue.c,v 1.1 2019/12/24 09:37:53 anton Exp $ */ +/* $OpenBSD: test-kqueue.c,v 1.2 2019/12/24 11:42:34 anton Exp $ */ /* * Copyright (c) 2019 Anton Lindqvist <anton@openbsd.org> @@ -268,22 +268,10 @@ kqueue_thread(void *arg) if (nevents != 1) errx(1, "kevent: %d != 1", nevents); - switch (ctx->c_mode) { - case KQUEUE_READ: - case KQUEUE_READ_EOF: - if ((int)kev.ident != ctx->c_pipe[0]) - errx(1, "kevent: ident"); - if (kev.filter != EVFILT_READ) - errx(1, "kevent: filter"); - break; - case KQUEUE_WRITE: - case KQUEUE_WRITE_EOF: - if ((int)kev.ident != ctx->c_pipe[1]) - errx(1, "kevent: ident"); - if (kev.filter != EVFILT_WRITE) - errx(1, "kevent: filter"); - break; - } + if ((int)kev.ident != fd) + errx(1, "kevent: ident"); + if (kev.filter != filter) + errx(1, "kevent: filter"); switch (ctx->c_mode) { case KQUEUE_READ_EOF: |