dedup

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

commit 1d2884eaed1369060c8fa872fc15b0c4dfefa090
parent a4b92b7d3ace3ec50598726b3879ead44864f4e1
Author: sin <sin@2f30.org>
Date:   Tue, 14 May 2019 14:12:04 +0300

Style fix

Diffstat:
Mbcompress.c | 16++++++++--------
Msnap.c | 1-
2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/bcompress.c b/bcompress.c @@ -193,15 +193,15 @@ bcput(struct bctx *bctx, void *buf, size_t n, unsigned char *md) return -1; } } else if (cctx->type == CDLZ4TYPE) { - int ret; + int r; - ret = LZ4_compress_default(buf, &cbuf[CDSIZE], n, cn); - if (ret < 0) { + r = LZ4_compress_default(buf, &cbuf[CDSIZE], n, cn); + if (r < 0) { free(cbuf); seterr("LZ4_compress_default: failed"); return -1; } - cn = ret; + cn = r; } else { free(cbuf); seterr("invalid compression type: %d", cctx->type); @@ -283,15 +283,15 @@ bcget(struct bctx *bctx, unsigned char *md, void *buf, size_t *n) return -1; } } else if (cd.type == CDLZ4TYPE) { - int ret; + int r; - ret = LZ4_decompress_safe(&cbuf[CDSIZE], buf, cd.size, *n); - if (ret < 0) { + r = LZ4_decompress_safe(&cbuf[CDSIZE], buf, cd.size, *n); + if (r < 0) { free(cbuf); seterr("LZ4_decompress_safe: failed"); return -1; } - un = ret; + un = r; } else { free(cbuf); seterr("invalid compression type: %d", cd.type); diff --git a/snap.c b/snap.c @@ -247,7 +247,6 @@ screat(char *path, int mode, struct sctx **sctx) seterr("failed to write snapshot header: %s", strerror(errno)); return -1; } - return 0; }