diff options
| author | vapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-06-24 21:37:59 +0000 |
|---|---|---|
| committer | vapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-06-24 21:37:59 +0000 |
| commit | 8bbe710b7e23ac570f0524fcd1f89a68cf52cf2d (patch) | |
| tree | 5e305d33f689143a0e920950913f4e23125198bd | |
| parent | 3dc92343c03f8c98e8ce48d7cae43c2b9362d529 (diff) | |
| download | busybox-w32-8bbe710b7e23ac570f0524fcd1f89a68cf52cf2d.tar.gz busybox-w32-8bbe710b7e23ac570f0524fcd1f89a68cf52cf2d.tar.bz2 busybox-w32-8bbe710b7e23ac570f0524fcd1f89a68cf52cf2d.zip | |
tweak signed/unsigned char usage to avoid mismatches
git-svn-id: svn://busybox.net/trunk/busybox@10585 69ca8d6d-28ef-0310-b511-8ec308f3f277
| -rw-r--r-- | coreutils/md5_sha1_sum.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c index 914f81fa2..4f841f638 100644 --- a/coreutils/md5_sha1_sum.c +++ b/coreutils/md5_sha1_sum.c | |||
| @@ -42,7 +42,7 @@ static unsigned char *hash_bin_to_hex(unsigned char *hash_value, | |||
| 42 | max = (hash_length * 2) + 2; | 42 | max = (hash_length * 2) + 2; |
| 43 | hex_value = xmalloc(max); | 43 | hex_value = xmalloc(max); |
| 44 | for (x = len = 0; x < hash_length; x++) { | 44 | for (x = len = 0; x < hash_length; x++) { |
| 45 | len += snprintf(hex_value + len, max - len, "%02x", hash_value[x]); | 45 | len += snprintf((char*)(hex_value + len), max - len, "%02x", hash_value[x]); |
| 46 | } | 46 | } |
| 47 | return (hex_value); | 47 | return (hex_value); |
| 48 | } | 48 | } |
| @@ -98,7 +98,7 @@ static int hash_files(int argc, char **argv, const uint8_t hash_algo) | |||
| 98 | FILE *pre_computed_stream; | 98 | FILE *pre_computed_stream; |
| 99 | int count_total = 0; | 99 | int count_total = 0; |
| 100 | int count_failed = 0; | 100 | int count_failed = 0; |
| 101 | unsigned char *file_ptr = argv[optind]; | 101 | char *file_ptr = argv[optind]; |
| 102 | char *line; | 102 | char *line; |
| 103 | 103 | ||
| 104 | if (optind + 1 != argc) { | 104 | if (optind + 1 != argc) { |
| @@ -129,7 +129,7 @@ static int hash_files(int argc, char **argv, const uint8_t hash_algo) | |||
| 129 | 129 | ||
| 130 | hash_value = hash_file(filename_ptr, hash_algo); | 130 | hash_value = hash_file(filename_ptr, hash_algo); |
| 131 | 131 | ||
| 132 | if (hash_value && (strcmp(hash_value, line) == 0)) { | 132 | if (hash_value && (strcmp((char*)hash_value, line) == 0)) { |
| 133 | if (!(flags & FLAG_SILENT)) | 133 | if (!(flags & FLAG_SILENT)) |
| 134 | printf("%s: OK\n", filename_ptr); | 134 | printf("%s: OK\n", filename_ptr); |
| 135 | } else { | 135 | } else { |
| @@ -162,7 +162,7 @@ static int hash_files(int argc, char **argv, const uint8_t hash_algo) | |||
| 162 | hash_value = xmalloc(hash_length); | 162 | hash_value = xmalloc(hash_length); |
| 163 | 163 | ||
| 164 | while (optind < argc) { | 164 | while (optind < argc) { |
| 165 | unsigned char *file_ptr = argv[optind++]; | 165 | char *file_ptr = argv[optind++]; |
| 166 | 166 | ||
| 167 | hash_value = hash_file(file_ptr, hash_algo); | 167 | hash_value = hash_file(file_ptr, hash_algo); |
| 168 | if (hash_value == NULL) { | 168 | if (hash_value == NULL) { |
