Note that the fclose(3) page does already say:
RETURN VALUE
Upon successful completion 0 is returned. Otherwise, EOF is
returned and errno is set to indicate the error. In either
case any further access (including another call to fclose()) to
the stream results in undefined behavior.-- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

