X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Fext.c;h=1fd9549019330f5944a83c4ac7a70c2bce93daab;hb=6d861ac87491a207e4599c44b61d142f0a601c2d;hp=6b8ce91c5eb2a9fca45a8a9771ccea99452b5152;hpb=e5cb55fedd811f71cd91ef097a8a4a4964d8c564;p=musl diff --git a/src/stdio/ext.c b/src/stdio/ext.c index 6b8ce91c..1fd95490 100644 --- a/src/stdio/ext.c +++ b/src/stdio/ext.c @@ -14,12 +14,12 @@ int __fsetlocking(FILE *f, int type) int __fwriting(FILE *f) { - return f->wend && f->wpos > f->wbase; + return (f->flags & F_NORD) || f->wend; } int __freading(FILE *f) { - return f->rend > f->rpos; + return (f->flags & F_NOWR) || f->rend; } int __freadable(FILE *f)