diff options
author | rsc <devnull@localhost> | 2006-04-20 21:01:48 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-04-20 21:01:48 +0000 |
commit | 4f959600b6cce4334367e7748e87a2a0ec42ab29 (patch) | |
tree | 40f5831a170e9aca286d908610755e30bbc7097a | |
parent | a5f3a00bcd0452d78afc5d8064da611d4b448093 (diff) | |
download | plan9port-4f959600b6cce4334367e7748e87a2a0ec42ab29.tar.gz plan9port-4f959600b6cce4334367e7748e87a2a0ec42ab29.tar.bz2 plan9port-4f959600b6cce4334367e7748e87a2a0ec42ab29.zip |
minor bug fixes (mechiel lukkien, andrey)
-rw-r--r-- | src/cmd/venti/srv/bloom.c | 2 | ||||
-rw-r--r-- | src/cmd/venti/srv/fmtbloom.c | 2 | ||||
-rw-r--r-- | src/cmd/venti/srv/graph.c | 2 | ||||
-rw-r--r-- | src/cmd/venti/srv/part.c | 2 |
4 files changed, 3 insertions, 5 deletions
diff --git a/src/cmd/venti/srv/bloom.c b/src/cmd/venti/srv/bloom.c index e8defb4a..e54e3885 100644 --- a/src/cmd/venti/srv/bloom.c +++ b/src/cmd/venti/srv/bloom.c @@ -101,8 +101,6 @@ gethashes(u8int *score, ulong *h) a ^= *(u32int*)(score+i); b ^= *(u32int*)(score+i+4); } - if(i+4 <= VtScoreSize) /* 20 is not 4-aligned */ - a ^= *(u32int*)(score+i); for(i=0; i<BloomMaxHash; i++, a+=b) h[i] = a < BloomHeadSize*8 ? BloomHeadSize*8 : a; } diff --git a/src/cmd/venti/srv/fmtbloom.c b/src/cmd/venti/srv/fmtbloom.c index aca5c533..f700d781 100644 --- a/src/cmd/venti/srv/fmtbloom.c +++ b/src/cmd/venti/srv/fmtbloom.c @@ -107,7 +107,7 @@ threadmain(int argc, char *argv[]) b.nhash = nhash; bits = nhash*10/7; nblocks = (8*size)/bits; - fprint(2, "fmtbloom: using %lldMB, %d hashes/score, best up to %,lld blocks\n", size, nhash, nblocks); + fprint(2, "fmtbloom: using %lldMB, %d hashes/score, best up to %,lld blocks\n", size/1024/1024, nhash, nblocks); b.data = vtmallocz(size); b.part = part; if(writebloom(&b) < 0) diff --git a/src/cmd/venti/srv/graph.c b/src/cmd/venti/srv/graph.c index 8b28c237..647c74b2 100644 --- a/src/cmd/venti/srv/graph.c +++ b/src/cmd/venti/srv/graph.c @@ -121,7 +121,7 @@ statgraph(Graph *g) if(g->wid > nelem(bin)) g->wid = nelem(bin); if(g->fill < 0) - g->fill = ((uint)g->arg>>8)%nelem(lofill); + g->fill = ((uint)(uintptr)g->arg>>8)%nelem(lofill); if(g->fill > nelem(lofill)) g->fill %= nelem(lofill); diff --git a/src/cmd/venti/srv/part.c b/src/cmd/venti/srv/part.c index f804af88..ff5c98e5 100644 --- a/src/cmd/venti/srv/part.c +++ b/src/cmd/venti/srv/part.c @@ -313,7 +313,7 @@ print("FAILED isread=%d r=%d count=%d blocksize=%d\n", isread, r, count, blocksi memmove(buf, tmp, count); else{ memmove(tmp, buf, count); - if(pwrite(fd, tmp, opsize, offset) != blocksize){ + if(pwrite(fd, tmp, blocksize, offset) != blocksize){ dst = tmp; op = "write"; goto Error; |