#endif
/* returns a hexdump in a static memory area */
-char *hexdump(unsigned char *buffer, size_t len)
+char *hexdump(const unsigned char *buffer, size_t len)
{
static char dump[200*3+1];
char *p = dump;
extern int test(char *URL); /* the actual test function provided by each
individual libXXX.c file */
-extern char *hexdump(unsigned char *buffer, size_t len);
+extern char *hexdump(const unsigned char *buffer, size_t len);
#ifdef UNITTESTS
extern int unitfail;
#define verify_memory(dynamic, check, len) \
if(dynamic && memcmp(dynamic, check, len)) { \
fprintf(stderr, "%s:%d Memory buffer mismatch size %d. '%s' is not\n", \
- __FILE__, __LINE__, len, hexdump((unsigned char *)check, len)); \
- fprintf(stderr, "%s:%d the same as '%s'\n", \
- __FILE__, __LINE__, hexdump((unsigned char *)dynamic, len)); \
+ __FILE__, __LINE__, len, \
+ hexdump((const unsigned char *)check, len)); \
+ fprintf(stderr, "%s:%d the same as '%s'\n", __FILE__, __LINE__, \
+ hexdump((const unsigned char *)dynamic, len)); \
unitfail++; \
}
};
for(i=0; i < sizeof(pairs)/sizeof(pairs[0]); i++) {
- char *out = Curl_dedotdotify((char *)pairs[i].input);
+ char *out = Curl_dedotdotify(pairs[i].input);
abort_unless(out != NULL, "returned NULL!");
if(strcmp(out, pairs[i].output)) {