X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fstdio%2Ffclose.c;h=373a2c76cc5b71b872817bf4735c7369a6bc4f82;hp=26bc37e8c3dbb82a0292f0f67a8b823b56158fc5;hb=dba68bf98fc708cea4c478278c889fc7ad802b00;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01 diff --git a/src/stdio/fclose.c b/src/stdio/fclose.c index 26bc37e8..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);