diff options
Diffstat (limited to 'coreutils/md5_sha1_sum.c')
-rw-r--r-- | coreutils/md5_sha1_sum.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c index c81619493..8690f4017 100644 --- a/coreutils/md5_sha1_sum.c +++ b/coreutils/md5_sha1_sum.c | |||
@@ -33,8 +33,8 @@ static uint8_t *hash_file(const char *filename, hash_algo_t hash_algo) | |||
33 | } context; | 33 | } context; |
34 | uint8_t *hash_value = NULL; | 34 | uint8_t *hash_value = NULL; |
35 | RESERVE_CONFIG_UBUFFER(in_buf, 4096); | 35 | RESERVE_CONFIG_UBUFFER(in_buf, 4096); |
36 | void (*update)(const void*, size_t, void*); | 36 | void FAST_FUNC (*update)(const void*, size_t, void*); |
37 | void (*final)(void*, void*); | 37 | void FAST_FUNC (*final)(void*, void*); |
38 | 38 | ||
39 | src_fd = open_or_warn_stdin(filename); | 39 | src_fd = open_or_warn_stdin(filename); |
40 | if (src_fd < 0) { | 40 | if (src_fd < 0) { |
@@ -44,13 +44,13 @@ static uint8_t *hash_file(const char *filename, hash_algo_t hash_algo) | |||
44 | /* figure specific hash algorithims */ | 44 | /* figure specific hash algorithims */ |
45 | if (ENABLE_MD5SUM && hash_algo==HASH_MD5) { | 45 | if (ENABLE_MD5SUM && hash_algo==HASH_MD5) { |
46 | md5_begin(&context.md5); | 46 | md5_begin(&context.md5); |
47 | update = (void (*)(const void*, size_t, void*))md5_hash; | 47 | update = (void*)md5_hash; |
48 | final = (void (*)(void*, void*))md5_end; | 48 | final = (void*)md5_end; |
49 | hash_len = 16; | 49 | hash_len = 16; |
50 | } else if (ENABLE_SHA1SUM && hash_algo==HASH_SHA1) { | 50 | } else if (ENABLE_SHA1SUM && hash_algo==HASH_SHA1) { |
51 | sha1_begin(&context.sha1); | 51 | sha1_begin(&context.sha1); |
52 | update = (void (*)(const void*, size_t, void*))sha1_hash; | 52 | update = (void*)sha1_hash; |
53 | final = (void (*)(void*, void*))sha1_end; | 53 | final = (void*)sha1_end; |
54 | hash_len = 20; | 54 | hash_len = 20; |
55 | } else { | 55 | } else { |
56 | bb_error_msg_and_die("algorithm not supported"); | 56 | bb_error_msg_and_die("algorithm not supported"); |