[BusyBox-cvs] svn commit: trunk/busybox/coreutils
vapier at busybox.net
vapier at busybox.net
Fri Jun 24 21:37:59 UTC 2005
Author: vapier
Date: 2005-06-24 15:37:59 -0600 (Fri, 24 Jun 2005)
New Revision: 10585
Log:
tweak signed/unsigned char usage to avoid mismatches
Modified:
trunk/busybox/coreutils/md5_sha1_sum.c
Changeset:
Modified: trunk/busybox/coreutils/md5_sha1_sum.c
===================================================================
--- trunk/busybox/coreutils/md5_sha1_sum.c 2005-06-24 14:29:10 UTC (rev 10584)
+++ trunk/busybox/coreutils/md5_sha1_sum.c 2005-06-24 21:37:59 UTC (rev 10585)
@@ -42,7 +42,7 @@
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 @@
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 @@
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 @@
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) {
More information about the busybox-cvs
mailing list