aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/md5_sha1_sum.c8
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) {