summaryrefslogtreecommitdiffstats
path: root/generic/tclIORChan.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-09-13 20:33:58 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-09-13 20:33:58 (GMT)
commitc5943ec574403a010f3065a6d8fdb6d590e68de4 (patch)
tree7bea997dbc3f729938cb44b5bd2350da28735287 /generic/tclIORChan.c
parentf11320b6b0dd2681bef8470d4fcf7c3b7eb6cbbd (diff)
downloadtcl-c5943ec574403a010f3065a6d8fdb6d590e68de4.zip
tcl-c5943ec574403a010f3065a6d8fdb6d590e68de4.tar.gz
tcl-c5943ec574403a010f3065a6d8fdb6d590e68de4.tar.bz2
Eliminate the use of macro's like LLONG_MAX|MIN, since they assume that Tcl_WideInt equals "long long". Also eliminate uses of Tcl_WideAsLong() and friends, as - often - simple type cases make things more clear.
Diffstat (limited to 'generic/tclIORChan.c')
-rw-r--r--generic/tclIORChan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c
index 354f1fb..611ee3f 100644
--- a/generic/tclIORChan.c
+++ b/generic/tclIORChan.c
@@ -1544,7 +1544,7 @@ ReflectSeekWide(
goto invalid;
}
- if (newLoc < Tcl_LongAsWide(0)) {
+ if (newLoc < 0) {
SetChannelErrorStr(rcPtr->chan, msg_seek_beforestart);
goto invalid;
}
@@ -1576,7 +1576,7 @@ ReflectSeek(
* routine.
*/
- return (int) ReflectSeekWide(clientData, Tcl_LongAsWide(offset), seekMode,
+ return ReflectSeekWide(clientData, offset, seekMode,
errorCodePtr);
}
@@ -3079,7 +3079,7 @@ ForwardProc(
Tcl_WideInt newLoc;
if (Tcl_GetWideIntFromObj(interp, resObj, &newLoc) == TCL_OK) {
- if (newLoc < Tcl_LongAsWide(0)) {
+ if (newLoc < 0) {
ForwardSetStaticError(paramPtr, msg_seek_beforestart);
paramPtr->seek.offset = -1;
} else {