diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2012-07-26 11:56:00 -0400 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2012-07-26 11:56:00 -0400 |
commit | ca83de0ec92b56c712f7a7376b21a1a1337b3107 (patch) | |
tree | 1047916b5164a57d12ff50eaf26e5954803f0e29 /io.c | |
parent | 1a69f3ec43ba9748ad63443f88b2e26b014c11d2 (diff) | |
download | egawk-ca83de0ec92b56c712f7a7376b21a1a1337b3107.tar.gz egawk-ca83de0ec92b56c712f7a7376b21a1a1337b3107.tar.bz2 egawk-ca83de0ec92b56c712f7a7376b21a1a1337b3107.zip |
Document the parser interface and remove some excessive readdir paranoia.
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -3036,7 +3036,7 @@ find_longest_terminator: return REC_OK; } -/* get_a_record --- read a record from IOP into out, return length of EOF, set RT */ +/* get_a_record --- read a record from IOP into out, return length of EOF, set RT. Note that errcode is never NULL, and the caller initializes *errcode to 0. */ static int get_a_record(char **out, /* pointer to pointer to data */ @@ -3071,8 +3071,7 @@ get_a_record(char **out, /* pointer to pointer to data */ return EOF; } else if (iop->count == -1) { iop->flag |= IOP_AT_EOF; - if (errcode != NULL) - *errcode = errno; + *errcode = errno; return EOF; } else { iop->dataend = iop->buf + iop->count; |