diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-10-16 20:45:27 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-10-16 20:45:27 +0200 |
commit | c0683acce88efc1fe15d9a4332428b5a9fdc6c2e (patch) | |
tree | cb0f5bb99b5e5f4490be175238d3a877115bc468 /coreutils/md5_sha1_sum.c | |
parent | 1a5e11c874a1f53c5205140a9d675b7e6404bbc9 (diff) | |
download | busybox-w32-c0683acce88efc1fe15d9a4332428b5a9fdc6c2e.tar.gz busybox-w32-c0683acce88efc1fe15d9a4332428b5a9fdc6c2e.tar.bz2 busybox-w32-c0683acce88efc1fe15d9a4332428b5a9fdc6c2e.zip |
*: pass md5/shaN context pointer as 1st arg, not last
function old new delta
md5_hash_block 458 459 +1
filter_rename_config 252 250 -2
md5_crypt 591 587 -4
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/md5_sha1_sum.c')
-rw-r--r-- | coreutils/md5_sha1_sum.c | 6 |
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 | ||