aboutsummaryrefslogtreecommitdiffstats
path: root/bsum.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-02-23 14:20:43 +0100
committerMattias Andrée <m@maandree.se>2026-02-23 14:20:43 +0100
commite7bae9c3cd0d267ebac380e34ee1cd0c1e6cf740 (patch)
tree8c09b3ea8e4b0e9b518ca5c8bacaef492bc64282 /bsum.c
parentm fixes (diff)
downloadblakesum-e7bae9c3cd0d267ebac380e34ee1cd0c1e6cf740.tar.gz
blakesum-e7bae9c3cd0d267ebac380e34ee1cd0c1e6cf740.tar.bz2
blakesum-e7bae9c3cd0d267ebac380e34ee1cd0c1e6cf740.tar.xz
fix warningsHEAD1.0.1master
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'bsum.c')
-rw-r--r--bsum.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/bsum.c b/bsum.c
index 80bc203..775715b 100644
--- a/bsum.c
+++ b/bsum.c
@@ -12,7 +12,7 @@ static int flag_upper = 0;
static int flag_hex = 0;
static int flag_zero = 0;
static int length;
-static void *salt = NULL;
+static void *flag_salt = NULL;
static void
usage(void)
@@ -85,7 +85,7 @@ hash_fd_blake(int fd, const char *fname, int decode_hex, unsigned char hash[], v
req = get_buf_size_func(len, 0, NULL);
if (req > size)
buf = erealloc(buf, size);
- libblake_blake224_digest(state, buf, len, 0, NULL, hash);
+ digest_func(state, buf, len, 0, NULL, hash);
free(buf);
return 0;
}
@@ -140,13 +140,13 @@ hash_fd(int fd, const char *fname, int decode_hex, unsigned char hash[])
int ret;
if (length == 224)
- ret = hash_fd_blake224(fd, fname, decode_hex, hash, salt);
+ ret = hash_fd_blake224(fd, fname, decode_hex, hash, flag_salt);
else if (length == 256)
- ret = hash_fd_blake256(fd, fname, decode_hex, hash, salt);
+ ret = hash_fd_blake256(fd, fname, decode_hex, hash, flag_salt);
else if (length == 384)
- ret = hash_fd_blake384(fd, fname, decode_hex, hash, salt);
+ ret = hash_fd_blake384(fd, fname, decode_hex, hash, flag_salt);
else if (length == 512)
- ret = hash_fd_blake512(fd, fname, decode_hex, hash, salt);
+ ret = hash_fd_blake512(fd, fname, decode_hex, hash, flag_salt);
else
abort();
@@ -214,7 +214,7 @@ main(int argc, char *argv[])
if (salt_str) {
parse_salt(salt_buf, salt_str, length <= 256 ? 16 : 32);
- salt = salt_buf;
+ flag_salt = salt_buf;
}
newline = flag_zero ? '\0' : '\n';