From fa325e9b42b0bdfb48857d1958d9fb7ceac55151 Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Fri, 10 Jan 2020 14:44:21 +0000 Subject: Trivial changes: whitespace and modes. Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross --- src/cmd/venti/srv/bloom.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/cmd/venti/srv/bloom.c') diff --git a/src/cmd/venti/srv/bloom.c b/src/cmd/venti/srv/bloom.c index 42418d1c..d50b1777 100644 --- a/src/cmd/venti/srv/bloom.c +++ b/src/cmd/venti/srv/bloom.c @@ -1,6 +1,6 @@ /* * Bloom filter tracking which scores are present in our arenas - * and (more importantly) which are not. + * and (more importantly) which are not. */ #include "stdinc.h" @@ -13,19 +13,19 @@ int bloominit(Bloom *b, vlong vsize, u8int *data) { ulong size; - + size = vsize; if(size != vsize){ /* truncation */ werrstr("bloom data too big"); return -1; } - + b->size = size; b->nhash = 32; /* will be fixed by caller on initialization */ if(data != nil) if(unpackbloomhead(b, data) < 0) return -1; - + b->bitmask = (b->size<<3) - 1; b->data = data; return 0; @@ -42,7 +42,7 @@ readbloom(Part *p) { uchar buf[512]; Bloom *b; - + b = vtmallocz(sizeof *b); if(readpart(p, 0, buf, sizeof buf) < 0) return nil; @@ -75,7 +75,7 @@ int resetbloom(Bloom *b) { uchar *data; - + data = vtmallocz(b->size); b->data = data; if(b->size == MaxBloomSize) /* 2^32 overflows ulong */ @@ -92,7 +92,7 @@ loadbloom(Bloom *b) uint ones; uchar *data; u32int *a; - + data = vtmallocz(b->size); if(readpart(b->part, 0, data, b->size) < 0){ vtfree(b); @@ -105,14 +105,14 @@ loadbloom(Bloom *b) n = b->size/4; ones = 0; for(i=0; isize == MaxBloomSize) /* 2^32 overflows ulong */ addstat(StatBloomBits, b->size*8-1); else addstat(StatBloomBits, b->size*8); - + return 0; } @@ -204,7 +204,7 @@ inbloomfilter(Bloom *b, u8int *score) if(ignorebloom) return 1; - + rlock(&b->lk); r = _inbloomfilter(b, score); runlock(&b->lk); @@ -236,7 +236,7 @@ markbloomfiltern(Bloom *b, u8int score[][20], int n) if(b == nil || b->data == nil) return; - + rlock(&b->lk); qlock(&b->mod); for(i=0; iwritechan, 0); @@ -268,5 +268,5 @@ startbloomproc(Bloom *b) { b->writechan = chancreate(sizeof(void*), 0); b->writedonechan = chancreate(sizeof(ulong), 0); - vtproc(bloomwriteproc, b); + vtproc(bloomwriteproc, b); } -- cgit v1.2.3