If ferror is true, we must reset the error indicator.

Submitted by:	Liam J. Foy <liamfoy@sepulcrum.org>
Approved by:	grehan (mentor)
This commit is contained in:
Suleiman Souhlal 2004-12-15 06:24:57 +00:00
parent 4011d8a8c9
commit f6bbd7a8e9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=138883

View File

@ -103,6 +103,7 @@ main(int argc, char *argv[])
}
if (ferror(fp)) {
warn("%s", filename);
clearerr(fp);
rval = 1;
}
(void)fclose(fp);