aboutsummaryrefslogtreecommitdiffstats
path: root/interpret.h
diff options
context:
space:
mode:
Diffstat (limited to 'interpret.h')
-rw-r--r--interpret.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/interpret.h b/interpret.h
index 27f194ae..c26a9d46 100644
--- a/interpret.h
+++ b/interpret.h
@@ -1191,10 +1191,13 @@ match_re:
JUMPTO(ni);
}
- if (inrec(curfile, & errcode) != 0) {
- if (errcode > 0 && (do_traditional || ! pc->has_endfile))
- fatal(_("error reading input file `%s': %s"),
+ if (! inrec(curfile, & errcode)) {
+ if (errcode > 0) {
+ update_ERRNO_int(errcode);
+ if (do_traditional || ! pc->has_endfile)
+ fatal(_("error reading input file `%s': %s"),
curfile->public.name, strerror(errcode));
+ }
JUMPTO(ni);
} /* else