dedup

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

commit ca6087f9ea02fe655dfb1db5ef4bbcb45528baa5
parent fecf79960e6acd97640b944b9b7d653e5c2b5a52
Author: sin <sin@2f30.org>
Date:   Thu, 16 May 2019 12:40:28 +0100

Return 1 if a block hash mismatch is detected

Diffstat:
Mblock.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/block.c b/block.c @@ -154,13 +154,15 @@ bcheck(struct bctx *bctx, unsigned char *md) if (bhash(buf, n, tmp) < 0) { free(buf); + seterr("bhash: failed"); return -1; } if (memcmp(tmp, md, MDSIZE) != 0) { free(buf); - return -1; + return 1; } + free(buf); return 0; }