X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fstdio%2Ffclose.c;h=373a2c76cc5b71b872817bf4735c7369a6bc4f82;hp=9481470de12777352763f15e5c0b5834b832466a;hb=dba68bf98fc708cea4c478278c889fc7ad802b00;hpb=bd6746732536fdf2ebaadff6f98aee0879b1674d diff --git a/src/stdio/fclose.c b/src/stdio/fclose.c index 9481470d..373a2c76 100644 --- a/src/stdio/fclose.c +++ b/src/stdio/fclose.c @@ -9,11 +9,12 @@ int fclose(FILE *f) OFLLOCK(); if (f->prev) f->prev->next = f->next; if (f->next) f->next->prev = f->prev; - if (ofl_head == f) ofl_head = f->next; + if (libc.ofl_head == f) libc.ofl_head = f->next; OFLUNLOCK(); } - r = -(fflush(f) || f->close(f)); + r = fflush(f); + r |= f->close(f); if (!perm) free(f);