Let hash_buffer take a void* to avoid some casting

This commit is contained in:
Joel Rosdahl 2010-04-27 08:18:16 +02:00
parent ede39e1eb7
commit 6331376531
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ int hash_fd(struct mdfour *md, int fd);
int hash_file(struct mdfour *md, const char *fname);
char *hash_result(struct mdfour *md);
void hash_result_as_bytes(struct mdfour *md, unsigned char *out);
void hash_buffer(struct mdfour *md, const char *s, size_t len);
void hash_buffer(struct mdfour *md, const void *s, size_t len);
void cc_log(const char *format, ...) ATTR_FORMAT(printf, 1, 2);
void fatal(const char *format, ...) ATTR_FORMAT(printf, 1, 2);

2
hash.c
View File

@ -26,7 +26,7 @@
#include <string.h>
#include <unistd.h>
void hash_buffer(struct mdfour *md, const char *s, size_t len)
void hash_buffer(struct mdfour *md, const void *s, size_t len)
{
mdfour_update(md, (unsigned char *)s, len);
}