author | Rich Felker <dalias@aerifal.cx> | 2012年06月17日 21:24:58 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012年06月17日 21:24:58 -0400 |
commit | deb90c79e5c498fbb48de1423df034447f330e38 (patch) | |
tree | 7320e1105670316cc579731ba4002c50803c6bfb /src/stdio/ext.c | |
parent | 3b43d10fafd64ac0a93fab463330a936b90ec15c (diff) | |
download | musl-deb90c79e5c498fbb48de1423df034447f330e38.tar.gz |
-rw-r--r-- | src/stdio/ext.c | 4 |
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) |