summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/tclWinChan.c2
-rw-r--r--win/tclWinPipe.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/win/tclWinChan.c b/win/tclWinChan.c
index 9b018e4..6ce0735 100644
--- a/win/tclWinChan.c
+++ b/win/tclWinChan.c
@@ -1106,7 +1106,7 @@ TclpOpenFileChannel(
return NULL;
}
- switch (mode & (O_RDONLY | O_WRONLY | O_RDWR)) {
+ switch (mode & O_ACCMODE) {
case O_RDONLY:
accessMode = GENERIC_READ;
channelPermissions = TCL_READABLE;
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index bb4983e..0d5e86e 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -538,7 +538,7 @@ TclpOpenFile(
* Map the access bits to the NT access mode.
*/
- switch (mode & (O_RDONLY | O_WRONLY | O_RDWR)) {
+ switch (mode & O_ACCMODE) {
case O_RDONLY:
accessMode = GENERIC_READ;
break;