summaryrefslogtreecommitdiff
path: root/usr.bin/m4
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2015-12-07 14:12:47 +0000
committerMarc Espie <espie@cvs.openbsd.org>2015-12-07 14:12:47 +0000
commitb2f164b6764c84086133b178ee3365bf5bc118ff (patch)
tree97da65a7172d1045caeda38aa040941eb1e47fb8 /usr.bin/m4
parent0ce3a61d70a418fb7389fc2bd9fc1447baf17bcb (diff)
Yet another missed ferror call
Diffstat (limited to 'usr.bin/m4')
-rw-r--r--usr.bin/m4/misc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/m4/misc.c b/usr.bin/m4/misc.c
index 122cf0b3dc5..e0fbb2f4036 100644
--- a/usr.bin/m4/misc.c
+++ b/usr.bin/m4/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.45 2014/12/21 09:33:12 espie Exp $ */
+/* $OpenBSD: misc.c,v 1.46 2015/12/07 14:12:46 espie Exp $ */
/* $NetBSD: misc.c,v 1.6 1995/09/28 05:37:41 tls Exp $ */
/*
@@ -421,6 +421,8 @@ do_emit_synchline()
void
release_input(struct input_file *f)
{
+ if (ferror(f->file))
+ errx(1, "Fatal error reading from %s\n", f->name);
if (f->file != stdin)
fclose(f->file);
f->c = EOF;