summaryrefslogtreecommitdiff
path: root/src/stdio/fflush.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/fflush.c')
-rw-r--r--src/stdio/fflush.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/stdio/fflush.c b/src/stdio/fflush.c
index 7bf862a6..3f462c80 100644
--- a/src/stdio/fflush.c
+++ b/src/stdio/fflush.c
@@ -35,13 +35,12 @@ int fflush(FILE *f)
r = __stdout_used ? fflush(__stdout_used) : 0;
- OFLLOCK();
- for (f=libc.ofl_head; f; f=f->next) {
+ for (f=*__ofl_lock(); f; f=f->next) {
FLOCK(f);
if (f->wpos > f->wbase) r |= __fflush_unlocked(f);
FUNLOCK(f);
}
- OFLUNLOCK();
+ __ofl_unlock();
return r;
}