summaryrefslogtreecommitdiff
path: root/trans/streamio.c
diff options
context:
space:
mode:
Diffstat (limited to 'trans/streamio.c')
-rw-r--r--trans/streamio.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/trans/streamio.c b/trans/streamio.c
index 0faa8a3e..c563c03c 100644
--- a/trans/streamio.c
+++ b/trans/streamio.c
@@ -554,8 +554,7 @@ trivfs_S_io_select (struct trivfs_protid *cred,
if (!(cred->po->openmodes & O_WRITE) && (*type & SELECT_WRITE))
return EBADF;
- if (*type & ~(SELECT_READ | SELECT_WRITE))
- return EINVAL;
+ *type &= SELECT_READ | SELECT_WRITE;
if (*type == 0)
return 0;