X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2F__toread.c;h=f142ff09c087ef5459a29acd004fd005ddfc8a0c;hb=1d5750b95c06913a1f18a995481276d698d20fae;hp=b08f5bb440345efefc5dd0f4d8679e0a56eb91e0;hpb=2b4fcfdacf93c3dfd6ac15e31790a9e154374679;p=musl diff --git a/src/stdio/__toread.c b/src/stdio/__toread.c index b08f5bb4..f142ff09 100644 --- a/src/stdio/__toread.c +++ b/src/stdio/__toread.c @@ -3,7 +3,7 @@ int __toread(FILE *f) { f->mode |= f->mode-1; - if (f->wpos > f->buf) f->write(f, 0, 0); + if (f->wpos != f->wbase) f->write(f, 0, 0); f->wpos = f->wbase = f->wend = 0; if (f->flags & F_NORD) { f->flags |= F_ERR; @@ -13,9 +13,7 @@ int __toread(FILE *f) return (f->flags & F_EOF) ? EOF : 0; } -void __stdio_exit_needed(void); - -void __toread_needs_stdio_exit() +hidden void __toread_needs_stdio_exit() { __stdio_exit_needed(); }