X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2F__toread.c;h=f142ff09c087ef5459a29acd004fd005ddfc8a0c;hb=595416b11dfbc82d40a59d0edd7e3b04ba7a2d6d;hp=35f67b8f8d9386dff7025d88f073835e390b4733;hpb=6d1a3dfeaf2caac4033a3c65822fb4e7e14866c7;p=musl diff --git a/src/stdio/__toread.c b/src/stdio/__toread.c index 35f67b8f..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->wbase) 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(); }