diff options
author | ssouhlal <ssouhlal@FreeBSD.org> | 2004-12-15 06:24:57 +0000 |
---|---|---|
committer | ssouhlal <ssouhlal@FreeBSD.org> | 2004-12-15 06:24:57 +0000 |
commit | be55a34f7f674cbec52d1e8cbdebdacaa6546bc4 (patch) | |
tree | eed7f2ca09418f1c98e6c817ca54b962cb3f624a | |
parent | 5ec8391060c923f14f17e4c273b2932c53698a13 (diff) | |
download | FreeBSD-src-be55a34f7f674cbec52d1e8cbdebdacaa6546bc4.zip FreeBSD-src-be55a34f7f674cbec52d1e8cbdebdacaa6546bc4.tar.gz |
If ferror is true, we must reset the error indicator.
Submitted by: Liam J. Foy <liamfoy@sepulcrum.org>
Approved by: grehan (mentor)
-rw-r--r-- | usr.bin/rev/rev.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.bin/rev/rev.c b/usr.bin/rev/rev.c index 87c8587..67080fb 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); |