dedup

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

commit 713949530b79c2a78039cbd0fc9494393b2532e2
parent 9b25474a50c4fddfcf59d518767cd8c0f3f868ff
Author: sin <sin@2f30.org>
Date:   Sun,  7 Apr 2019 10:52:33 +0100

Make name more concrete

It will be ambiguous when encryption support is added.

Diffstat:
Mdedup.h | 2+-
Mhash.c | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dedup.h b/dedup.h @@ -31,7 +31,7 @@ enum hash_algo { BLAKE2B_ALGO, BLAKE2BP_ALGO, - NR_ALGOS, + NR_HASH_ALGOS, }; struct chunker; diff --git a/hash.c b/hash.c @@ -17,7 +17,7 @@ static struct hash_ops { int (*init)(struct hash_ctx *ctx, size_t n); int (*update)(struct hash_ctx *ctx, const void *buf, size_t n); int (*final)(struct hash_ctx *ctx, void *buf, size_t n); -} hashes[NR_ALGOS] = { +} hashes[NR_HASH_ALGOS] = { { .init = blake2bi, .update = blake2bu, @@ -86,7 +86,7 @@ blake2bpf(struct hash_ctx *ctx, void *buf, size_t n) int hash_init(struct hash_ctx *ctx, int type, size_t n) { - if (type < 0 || type >= NR_ALGOS) + if (type < 0 || type >= NR_HASH_ALGOS) return -1; ctx->ops = &hashes[type];