diff options
author | cinap_lenrek <cinap_lenrek@cirno> | 2011-06-05 04:00:46 -0400 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@cirno> | 2011-06-05 04:00:46 -0400 |
commit | a36ab714ee9ee9764b590fd4bcf6fe6feb44e45b (patch) | |
tree | ff55ca2004098e888d5d4e82a69c0f8e89ba902c | |
parent | 2fa44c883eaf727a95f00257c0997bd63c66f7f6 (diff) | |
parent | c39aecc11186aa7ec7e4981614bfa3765d4af99e (diff) |
merge
-rw-r--r-- | sys/src/cmd/cwfs/cw.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/src/cmd/cwfs/cw.c b/sys/src/cmd/cwfs/cw.c index 2017e3388..c22693d6c 100644 --- a/sys/src/cmd/cwfs/cw.c +++ b/sys/src/cmd/cwfs/cw.c @@ -1448,19 +1448,21 @@ cwrecur(Cw *cw, Off addr, int tag, int tag1, long qp) cw->depth--; - if(na){ - if(b){ - p = getbuf(cw->dev, na, Brd); - if(!p || checktag(p, tag, qp)){ - fprint(2, "cwrecur: b/p null %s\n", cw->name); - na = 0; - } else { - memmove(p->iobuf, b->iobuf, RBUFSIZE); - p->flags |= Bmod|Bimm; - } - if(p) - putbuf(p); + if(b){ + p = getbuf(cw->dev, na ? na : addr, Brd); + if(!p || checktag(p, tag, qp)){ + fprint(2, "cwrecur: b/p null\n"); + na = 0; + } else { + memmove(p->iobuf, b->iobuf, RBUFSIZE); + p->flags |= Bmod|Bimm; } + if(p) + putbuf(p); + putbuf(b); + } + + if(na){ if(shouldstop){ if(cw->falsehits < 10) fprint(2, "shouldstop %lld %lld t=%s %s\n", @@ -1469,8 +1471,6 @@ cwrecur(Cw *cw, Off addr, int tag, int tag1, long qp) cw->falsehits++; } } - if(b) - putbuf(b); return na; } |