improve print_hex() prototype

This commit is contained in:
Steffen Jaeckel 2016-04-03 02:39:25 +02:00
parent 8fc1af1b7e
commit 08aabc7f8c
3 changed files with 4 additions and 3 deletions

View File

@ -95,7 +95,7 @@ int crc32_test(void);
/* yeah it's not exactly in misc in the library, but in testprof/x86_prof.c */
#if defined(LTC_TEST) && defined(LTC_TEST_DBG)
void print_hex(const char* what, const unsigned char* p, const unsigned long l);
void print_hex(const char* what, const void* p, const unsigned long l);
#endif
/* $Source$ */

View File

@ -80,7 +80,7 @@ extern int no_results;
extern const struct ltc_prng_descriptor no_prng_desc;
#endif
void print_hex(const char* what, const unsigned char* p, const unsigned long l);
void print_hex(const char* what, const void* v, const unsigned long l);
int sorter(const void *a, const void *b);
void tally_results(int type);
ulong64 rdtsc (void);

View File

@ -2,8 +2,9 @@
prng_state yarrow_prng;
void print_hex(const char* what, const unsigned char* p, const unsigned long l)
void print_hex(const char* what, const void* v, const unsigned long l)
{
const unsigned char* p = v;
unsigned long x;
fprintf(stderr, "%s contents: \n", what);
for (x = 0; x < l; ) {