dedup

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

commit 97d999a1a20a8e4fbe6a3c93825e94b54e4b071a
parent b314f213a126fe090d8fa3bb6a9cad0e5dff7ba9
Author: sin <sin@2f30.org>
Date:   Sat,  2 Mar 2019 16:01:32 +0000

Wrap long line

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

diff --git a/dedup.c b/dedup.c @@ -58,7 +58,7 @@ compr_size(size_t size) } static size_t -comp(uint8_t *in, uint8_t *out, size_t insize, size_t outsize) +compr(uint8_t *in, uint8_t *out, size_t insize, size_t outsize) { int ret; @@ -76,12 +76,13 @@ comp(uint8_t *in, uint8_t *out, size_t insize, size_t outsize) } static size_t -decomp(uint8_t *in, uint8_t *out, size_t insize, size_t outsize) +decompr(uint8_t *in, uint8_t *out, size_t insize, size_t outsize) { int ret; if (compr_enabled) { - ret = LZ4_decompress_safe((char *)in, (char *)out, insize, outsize); + ret = LZ4_decompress_safe((char *)in, (char *)out, insize, + outsize); if (ret < 0) errx(1, "LZ4_decompress_safe failed"); } else { @@ -233,7 +234,7 @@ dedup_chunk(struct snapshot *snap, uint8_t *chunkp, size_t chunk_size) compr_buf = alloc_buf(compr_size(BLKSIZE_MAX)); - n = comp(chunkp, compr_buf, chunk_size, compr_size(BLKSIZE_MAX)); + n = compr(chunkp, compr_buf, chunk_size, compr_size(BLKSIZE_MAX)); hash_blk(compr_buf, n, md); snap_hdr.st.orig_size += chunk_size; @@ -336,7 +337,7 @@ extract(struct snapshot *snap, void *arg) blk_desc = &snap->blk_desc[i]; read_blk(buf[1], blk_desc); - blksize = decomp(buf[1], buf[0], blk_desc->size, BLKSIZE_MAX); + blksize = decompr(buf[1], buf[0], blk_desc->size, BLKSIZE_MAX); xwrite(args->fd, buf[0], blksize); } free_buf(buf[1]);