summaryrefslogtreecommitdiff
path: root/sys/src/ape/lib/ap/stdio/fread.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@localhost>2011-05-10 05:33:43 +0000
committercinap_lenrek <cinap_lenrek@localhost>2011-05-10 05:33:43 +0000
commit3a78a07143fc793923e9f965820d97f4b3de6ec4 (patch)
tree0d1ca3ed0ac24e05000ed971f19caaa77f841c70 /sys/src/ape/lib/ap/stdio/fread.c
parentb73e068bfeff7337bf593fa5b2d2858c89f5f13e (diff)
ape: fix fread/fwrite, python: disable bytecode dumps, inst: rename textonly to start and remove inst/gui, add sys/lib/rootbind, cisfd(8) manpage
Diffstat (limited to 'sys/src/ape/lib/ap/stdio/fread.c')
-rw-r--r--sys/src/ape/lib/ap/stdio/fread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/ape/lib/ap/stdio/fread.c b/sys/src/ape/lib/ap/stdio/fread.c
index cf66c54fb..c064a5649 100644
--- a/sys/src/ape/lib/ap/stdio/fread.c
+++ b/sys/src/ape/lib/ap/stdio/fread.c
@@ -20,7 +20,7 @@ size_t fread(void *p, size_t recl, size_t nrec, FILE *f){
memcpy(s, f->rp, d);
f->rp+=d;
}else{
- if(n >= BIGN && f->state==RD && !(f->flags&STRING) && f->buf!=f->unbuf || f->buf == f->unbuf){
+ if(f->buf==f->unbuf || (n >= BIGN && f->state==RD && !(f->flags&STRING))){
d=read(f->fd, s, n);
if(d<=0){
f->state=(d==0)?END:ERR;