diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-06-24 21:37:59 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-06-24 21:37:59 +0000 |
commit | 9e164578f2a93873023d2619c223a6e53951caf4 (patch) | |
tree | 5e305d33f689143a0e920950913f4e23125198bd | |
parent | 778ee6da60ddbf249e8aa1d6c1aa05e5056a51c7 (diff) | |
download | busybox-9e164578f2a93873023d2619c223a6e53951caf4.tar.gz |
tweak signed/unsigned char usage to avoid mismatches
-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, max = (hash_length * 2) + 2; hex_value = xmalloc(max); for (x = len = 0; x < hash_length; x++) { - len += snprintf(hex_value + len, max - len, "%02x", hash_value[x]); + len += snprintf((char*)(hex_value + len), max - len, "%02x", hash_value[x]); } return (hex_value); } @@ -98,7 +98,7 @@ static int hash_files(int argc, char **argv, const uint8_t hash_algo) FILE *pre_computed_stream; int count_total = 0; int count_failed = 0; - unsigned char *file_ptr = argv[optind]; + char *file_ptr = argv[optind]; char *line; if (optind + 1 != argc) { @@ -129,7 +129,7 @@ static int hash_files(int argc, char **argv, const uint8_t hash_algo) hash_value = hash_file(filename_ptr, hash_algo); - if (hash_value && (strcmp(hash_value, line) == 0)) { + if (hash_value && (strcmp((char*)hash_value, line) == 0)) { if (!(flags & FLAG_SILENT)) printf("%s: OK\n", filename_ptr); } else { @@ -162,7 +162,7 @@ static int hash_files(int argc, char **argv, const uint8_t hash_algo) hash_value = xmalloc(hash_length); while (optind < argc) { - unsigned char *file_ptr = argv[optind++]; + char *file_ptr = argv[optind++]; hash_value = hash_file(file_ptr, hash_algo); if (hash_value == NULL) { |