From f6bbd7a8e918ea0f48c1aaf0aecab9051804d4a5 Mon Sep 17 00:00:00 2001 From: Suleiman Souhlal Date: Wed, 15 Dec 2004 06:24:57 +0000 Subject: [PATCH] If ferror is true, we must reset the error indicator. Submitted by: Liam J. Foy Approved by: grehan (mentor) --- usr.bin/rev/rev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/rev/rev.c b/usr.bin/rev/rev.c index 87c858712ff..67080fbb084 100644 --- a/usr.bin/rev/rev.c +++ b/usr.bin/rev/rev.c @@ -103,6 +103,7 @@ main(int argc, char *argv[]) } if (ferror(fp)) { warn("%s", filename); + clearerr(fp); rval = 1; } (void)fclose(fp);