diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-04-10 10:15:53 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-04-10 10:15:53 (GMT) |
| commit | 3133b4111d1ee2d9531dc3a9a1242124401d0883 (patch) | |
| tree | 1c00483d41ab09b78b6a6b446b70d08e830a34ca /generic/tclTest.c | |
| parent | 8ac73bbb406135935ecd132107be21351f74d5d0 (diff) | |
| download | tcl-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.c | 2 |
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; } |
