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:
parent
5ec8391060
commit
be55a34f7f
@ -103,6 +103,7 @@ main(int argc, char *argv[])
|
||||
}
|
||||
if (ferror(fp)) {
|
||||
warn("%s", filename);
|
||||
clearerr(fp);
|
||||
rval = 1;
|
||||
}
|
||||
(void)fclose(fp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user