X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fstdio%2Fext.c;h=1fd9549019330f5944a83c4ac7a70c2bce93daab;hp=6b8ce91c5eb2a9fca45a8a9771ccea99452b5152;hb=f1b23d41cff432a8d0939af427fa005b4a4f95d7;hpb=e5cb55fedd811f71cd91ef097a8a4a4964d8c564 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)