Make name more concrete - dedup - deduplicating backup program
HTML git clone git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
DIR commit 713949530b79c2a78039cbd0fc9494393b2532e2
DIR parent 9b25474a50c4fddfcf59d518767cd8c0f3f868ff
HTML 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:
M dedup.h | 2 +-
M hash.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
DIR 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;
DIR 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];