On Sun, 10 Jul 2022 20:58:35 -0900, Philip Guenther wrote:

> Three thoughts:
> 1) Since stdio errors are sticky, is there any real advantage to checking
> each call instead of just checking the final fclose()?

Will that really catch all errors?  From what I can tell, fclose(3)
can succeed even if the error flag was set.  The pattern I prefer
is to use a final fflush(3) followed by a call to ferror(3) before
the fclose(3).

 - todd

Reply via email to