dedup

data deduplication program
git clone git://git.2f30.org/dedup.git
Log | Files | Refs | README | LICENSE

commit 6d6cce9ed24f393e09afec8f45d3c2566210038d
parent 3ce9db0f144f9d5a39a9180ed343d9498d064778
Author: sin <sin@2f30.org>
Date:   Sun, 17 Feb 2019 21:51:47 +0000

Fix crash

Diffstat:
Mdedup.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dedup.c b/dedup.c @@ -502,7 +502,7 @@ check(struct ent *ent, void *arg) SHA256_CTX ctx; uint64_t i; - buf = alloc_buf(BLKSIZE); + buf = alloc_buf(comp_size(BLKSIZE)); /* * Calculate hash for each block and compare * with index entry block descriptor @@ -553,7 +553,7 @@ rebuild_cache(struct ent *ent, void *arg) SHA256_CTX ctx; uint64_t i; - buf = alloc_buf(BLKSIZE); + buf = alloc_buf(comp_size(BLKSIZE)); for (i = 0; i < ent->nblks; i++) { struct cent *cent; @@ -602,7 +602,7 @@ init_cache(void) uint64_t nents, i; uint64_t min, max, avg; - min = BLKSIZE; + min = comp_size(BLKSIZE); max = 0; avg = 0;