Perform inconsequential code cleanup

This commit is contained in:
Justine Tunney 2023-08-07 20:22:49 -07:00
parent 929478c524
commit decf216655
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
52 changed files with 326 additions and 442 deletions

View file

@ -47,7 +47,7 @@ int fclose(FILE *f) {
f->state = EOF;
if (f->noclose) {
f->fd = -1;
} else if (close(f->fd) == -1) {
} else if (f->fd != -1 && close(f->fd) == -1) {
f->state = errno;
}
if (f->state == EOF) {