aboutsummaryrefslogtreecommitdiff
path: root/coreutils/md5_sha1_sum.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/md5_sha1_sum.c')
-rw-r--r--coreutils/md5_sha1_sum.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c
index 5e36d391a..e79210c0d 100644
--- a/coreutils/md5_sha1_sum.c
+++ b/coreutils/md5_sha1_sum.c
@@ -43,7 +43,7 @@ static uint8_t *hash_file(const char *filename /*, hash_algo_t hash_algo*/)
43 } context; 43 } context;
44 uint8_t *hash_value = NULL; 44 uint8_t *hash_value = NULL;
45 RESERVE_CONFIG_UBUFFER(in_buf, 4096); 45 RESERVE_CONFIG_UBUFFER(in_buf, 4096);
46 void FAST_FUNC (*update)(const void*, size_t, void*); 46 void FAST_FUNC (*update)(void*, const void*, size_t);
47 void FAST_FUNC (*final)(void*, void*); 47 void FAST_FUNC (*final)(void*, void*);
48 hash_algo_t hash_algo = applet_name[3]; 48 hash_algo_t hash_algo = applet_name[3];
49 49
@@ -78,11 +78,11 @@ static uint8_t *hash_file(const char *filename /*, hash_algo_t hash_algo*/)
78 } 78 }
79 79
80 while (0 < (count = safe_read(src_fd, in_buf, 4096))) { 80 while (0 < (count = safe_read(src_fd, in_buf, 4096))) {
81 update(in_buf, count, &context); 81 update(&context, in_buf, count);
82 } 82 }
83 83
84 if (count == 0) { 84 if (count == 0) {
85 final(in_buf, &context); 85 final(&context, in_buf);
86 hash_value = hash_bin_to_hex(in_buf, hash_len); 86 hash_value = hash_bin_to_hex(in_buf, hash_len);
87 } 87 }
88 88