mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
libventi: correct vtfilesetsize bug (reported by Michael Kaminsky)
This commit is contained in:
parent
d19769ae98
commit
589ae3a367
2 changed files with 2 additions and 2 deletions
|
@ -312,7 +312,7 @@ vtcachelocal(VtCache *c, u32int addr, int type)
|
|||
sysfatal("vtcachelocal: asked for nonexistent block 0");
|
||||
if(addr > c->nblock)
|
||||
sysfatal("vtcachelocal: asked for block #%ud; only %d blocks",
|
||||
addr, c->nblock);
|
||||
(uint)addr, c->nblock);
|
||||
|
||||
b = &c->block[addr-1];
|
||||
if(b->addr == NilBlock || b->iostate != BioLocal)
|
||||
|
|
|
@ -342,7 +342,7 @@ shrinksize(VtFile *r, VtEntry *e, uvlong size)
|
|||
ptrsz *= ppb;
|
||||
|
||||
isdir = r->dir;
|
||||
while(depth > 0){
|
||||
while(DEPTH(type) > 0){
|
||||
if(b->addr == NilBlock){
|
||||
/* not worth copying the block just so we can zero some of it */
|
||||
vtblockput(b);
|
||||
|
|
Loading…
Reference in a new issue