dedup

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

commit e2132c16e018acb2c10cb95a3c260e763a77c30c
parent d72d20969c32c1304284819697bb1e5333f824ac
Author: sin <sin@2f30.org>
Date:   Sat, 27 Apr 2019 19:12:31 +0100

Some more style fix, rename some vars

Diffstat:
Mdup-check.c | 6+++---
Mdup-rm.c | 6+++---
Mdup-unpack.c | 6+++---
3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/dup-check.c b/dup-check.c @@ -18,13 +18,13 @@ static int check(struct sctx *sctx, struct bctx *bctx) { unsigned char md[MDSIZE]; - int sn; + int n; - while ((sn = sget(sctx, md)) == MDSIZE) { + while ((n = sget(sctx, md)) == MDSIZE) { if (bcheck(bctx, md) < 0) return -1; } - if (sn < 0) + if (n < 0) return -1; return 0; } diff --git a/dup-rm.c b/dup-rm.c @@ -19,13 +19,13 @@ static int rm(struct sctx *sctx, struct bctx *bctx) { unsigned char md[MDSIZE]; - int sn; + int n; - while ((sn = sget(sctx, md)) == MDSIZE) { + while ((n = sget(sctx, md)) == MDSIZE) { if (brm(bctx, md) < 0) return -1; } - if (sn < 0) + if (n < 0) return -1; return 0; } diff --git a/dup-unpack.c b/dup-unpack.c @@ -28,13 +28,13 @@ unpack(struct sctx *sctx, struct bctx *bctx) if (buf == NULL) return -1; while ((sn = sget(sctx, md)) == MDSIZE) { - size_t n = BSIZEMAX; + size_t bn = BSIZEMAX; - if (bget(bctx, md, buf, &n) < 0) { + if (bget(bctx, md, buf, &bn) < 0) { free(buf); return -1; } - if (xwrite(1, buf, n) != n) { + if (xwrite(1, buf, bn) != bn) { free(buf); return -1; }