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:
ssouhlal 2004-12-15 06:24:57 +00:00
parent 5ec8391060
commit be55a34f7f

View File

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