diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-11-18 10:29:41 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-11-18 10:29:41 (GMT) |
commit | b2a63152cbf72e7a23e9870d94bbf551373ef84b (patch) | |
tree | 7edbe522c18e704c6481c96aaa17f1163c688ca7 /generic/tclIORChan.c | |
parent | f1dbfbf21581370d5dad9cbeb4c8ac09f93fb30c (diff) | |
download | tcl-b2a63152cbf72e7a23e9870d94bbf551373ef84b.zip tcl-b2a63152cbf72e7a23e9870d94bbf551373ef84b.tar.gz tcl-b2a63152cbf72e7a23e9870d94bbf551373ef84b.tar.bz2 |
Now that we have TCL_AUTO_LENGTH/TCL_IO_FAILURE macro's, use them to make code and documentation more readable.
Shifted to feature branch as a temporary measure since it doesn't build.
Diffstat (limited to 'generic/tclIORChan.c')
-rw-r--r-- | generic/tclIORChan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index bc5bb04..31cd0bf 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -1287,7 +1287,7 @@ ReflectInput( PassReceivedError(rcPtr->chan, &p); *errorCodePtr = EINVAL; } - p.input.toRead = (size_t)-1; + p.input.toRead = TCL_AUTO_LENGTH; } else { *errorCodePtr = EOK; } @@ -2992,7 +2992,7 @@ ForwardProc( } else { ForwardSetObjError(paramPtr, resObj); } - paramPtr->input.toRead = (size_t)-1; + paramPtr->input.toRead = TCL_IO_FAILURE; } else { /* * Process a regular result. @@ -3005,7 +3005,7 @@ ForwardProc( if (paramPtr->input.toRead < bytec) { ForwardSetStaticError(paramPtr, msg_read_toomuch); - paramPtr->input.toRead = (size_t)-1; + paramPtr->input.toRead = TCL_IO_FAILURE; } else { if (bytec + 1 > 1) { memcpy(paramPtr->input.buf, bytev, bytec); |