aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-08-03 22:06:51 +0300
committerArnold D. Robbins <arnold@skeeve.com>2014-08-03 22:06:51 +0300
commit8f2f7ef2872a9a95dc1506504b60225ef98944f1 (patch)
treefc5953eec7188e5088efaca0bd88b30a76312651 /io.c
parent9a1a8c22e42af12f5859ef5d159b070f959912e6 (diff)
downloadegawk-8f2f7ef2872a9a95dc1506504b60225ef98944f1.tar.gz
egawk-8f2f7ef2872a9a95dc1506504b60225ef98944f1.tar.bz2
egawk-8f2f7ef2872a9a95dc1506504b60225ef98944f1.zip
Improve inrec setting ERRNO, doc of API get_record for errors.
Diffstat (limited to 'io.c')
-rw-r--r--io.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/io.c b/io.c
index 45b5015f..7930904d 100644
--- a/io.c
+++ b/io.c
@@ -590,16 +590,12 @@ inrec(IOBUF *iop, int *errcode)
if (cnt == EOF) {
retval = false;
- if (*errcode > 0)
- update_ERRNO_int(*errcode);
} else {
INCREMENT_REC(NR);
INCREMENT_REC(FNR);
set_record(begin, cnt);
- if (*errcode > 0) {
- update_ERRNO_int(*errcode);
+ if (*errcode > 0)
retval = false;
- }
}
return retval;