X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Ffflush.c;h=af7095033bca73c25a5488ebc2769207e5483666;hb=00e6bbcc05403aec1c96674c1060d54f5f237e87;hp=4c1647b7c9d933bf6d97c6954e45b9f68b556019;hpb=dba68bf98fc708cea4c478278c889fc7ad802b00;p=musl diff --git a/src/stdio/fflush.c b/src/stdio/fflush.c index 4c1647b7..af709503 100644 --- a/src/stdio/fflush.c +++ b/src/stdio/fflush.c @@ -15,9 +15,6 @@ static int __fflush_unlocked(FILE *f) f->wpos = f->wbase = f->wend = 0; f->rpos = f->rend = 0; - /* Hook for special behavior on flush */ - if (f->flush) f->flush(f); - return 0; } @@ -28,7 +25,6 @@ weak_alias(dummy, __stdout_used); int fflush(FILE *f) { int r; - FILE *next; if (f) { FLOCK(f); @@ -40,12 +36,9 @@ int fflush(FILE *f) r = __stdout_used ? fflush(__stdout_used) : 0; OFLLOCK(); - for (f=libc.ofl_head; f; f=next) { + for (f=libc.ofl_head; f; f=f->next) { FLOCK(f); - //OFLUNLOCK(); if (f->wpos > f->wbase) r |= __fflush_unlocked(f); - //OFLLOCK(); - next = f->next; FUNLOCK(f); } OFLUNLOCK();