diff options
| author | christos <christos@NetBSD.org> | 2020-05-01 21:42:34 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2020-05-01 21:42:34 +0000 |
| commit | 2e9e6892af0ce35aba49b0dd4f26e62fcc07f47d (patch) | |
| tree | 77f2a5b8d19f7094ae1080a7a16c6b2aec173ae5 /sys/modules | |
| parent | 71762559dda54d165eac31f3fa6560c243bbe05b (diff) | |
s/&&/&/ and also return POLLRDNORM (pointed out by joerg@)
Diffstat (limited to 'sys/modules')
| -rw-r--r-- | sys/modules/examples/pollpal/pollpal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/modules/examples/pollpal/pollpal.c b/sys/modules/examples/pollpal/pollpal.c index 63dd5737527..b76e0733699 100644 --- a/sys/modules/examples/pollpal/pollpal.c +++ b/sys/modules/examples/pollpal/pollpal.c @@ -1,4 +1,4 @@ -/* $NetBSD: pollpal.c,v 1.2 2020/04/30 07:07:22 mrg Exp $ */ +/* $NetBSD: pollpal.c,v 1.3 2020/05/01 21:42:34 christos Exp $ */ /*- * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pollpal.c,v 1.2 2020/04/30 07:07:22 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pollpal.c,v 1.3 2020/05/01 21:42:34 christos Exp $"); #include <sys/module.h> #include <sys/param.h> @@ -281,9 +281,9 @@ pollpal_poll(struct file *fp, int events) } break; case WRITE_WAITING: - if (events && (POLLIN | POLLRDNORM)) { + if (events & (POLLIN | POLLRDNORM)) { /* When device is in WRITE_WAITING state it can read. */ - revents |= POLLIN; + revents |= POLLIN | POLLRDNORM; } else { /* Record the request if it wasn't satisfied. */ selrecord(curlwp, &pl->psel); |
