summaryrefslogtreecommitdiffstats
path: root/generic/tclTest.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-04-10 10:15:53 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-04-10 10:15:53 (GMT)
commit3133b4111d1ee2d9531dc3a9a1242124401d0883 (patch)
tree1c00483d41ab09b78b6a6b446b70d08e830a34ca /generic/tclTest.c
parent8ac73bbb406135935ecd132107be21351f74d5d0 (diff)
downloadtcl-3133b4111d1ee2d9531dc3a9a1242124401d0883.zip
tcl-3133b4111d1ee2d9531dc3a9a1242124401d0883.tar.gz
tcl-3133b4111d1ee2d9531dc3a9a1242124401d0883.tar.bz2
Use O_ACCMODE in stead of the non-standard RW_MODES. Since O_RDONLY|O_WRONLY|O_RDWR aren't necessary separate flags, this is the standard way.
Diffstat (limited to 'generic/tclTest.c')
-rw-r--r--generic/tclTest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 37b9717..692034b 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -6994,7 +6994,7 @@ SimpleOpenFileChannel(
Tcl_Obj *tempPtr;
Tcl_Channel chan;
- if ((mode != 0) && !(mode & O_RDONLY)) {
+ if ((mode & O_ACCMODE) != O_RDONLY) {
Tcl_AppendResult(interp, "read-only", NULL);
return NULL;
}