diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-09-13 20:33:58 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-09-13 20:33:58 (GMT) |
| commit | c5943ec574403a010f3065a6d8fdb6d590e68de4 (patch) | |
| tree | 7bea997dbc3f729938cb44b5bd2350da28735287 /unix/tclUnixChan.c | |
| parent | f11320b6b0dd2681bef8470d4fcf7c3b7eb6cbbd (diff) | |
| download | tcl-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 'unix/tclUnixChan.c')
| -rw-r--r-- | unix/tclUnixChan.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index ced684a..435579a 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -383,7 +383,7 @@ FileSeekProc( */ oldLoc = TclOSseek(fsPtr->fd, (Tcl_SeekOffset) 0, SEEK_CUR); - if (oldLoc == Tcl_LongAsWide(-1)) { + if (oldLoc == -1) { /* * Bad things are happening. Error out... */ @@ -398,14 +398,14 @@ FileSeekProc( * Check for expressability in our return type, and roll-back otherwise. */ - if (newLoc > Tcl_LongAsWide(INT_MAX)) { + if (newLoc > INT_MAX) { *errorCodePtr = EOVERFLOW; TclOSseek(fsPtr->fd, (Tcl_SeekOffset) oldLoc, SEEK_SET); return -1; } else { - *errorCodePtr = (newLoc == Tcl_LongAsWide(-1)) ? errno : 0; + *errorCodePtr = (newLoc == -1) ? errno : 0; } - return (int) Tcl_WideAsLong(newLoc); + return (int) newLoc; } /* |
