diff --git a/misc.c b/misc.c index 0d5673b3..f3a0eedd 100644 --- a/misc.c +++ b/misc.c @@ -814,7 +814,7 @@ void safefree(void *ptr) #ifdef DEBUG extern void dputs(char *); /* defined in per-platform *misc.c */ -void debug_printf(char *fmt, ...) +void debug_printf(const char *fmt, ...) { char *buf; va_list ap; @@ -827,10 +827,10 @@ void debug_printf(char *fmt, ...) } -void debug_memdump(void *buf, int len, int L) +void debug_memdump(const void *buf, int len, int L) { int i; - unsigned char *p = buf; + const unsigned char *p = buf; char foo[17]; if (L) { int delta; diff --git a/misc.h b/misc.h index 2c60748c..4c6bd7ff 100644 --- a/misc.h +++ b/misc.h @@ -109,8 +109,8 @@ int match_ssh_id(int stringlen, const void *string, const char *id); */ #ifdef DEBUG -void debug_printf(char *fmt, ...); -void debug_memdump(void *buf, int len, int L); +void debug_printf(const char *fmt, ...); +void debug_memdump(const void *buf, int len, int L); #define debug(x) (debug_printf x) #define dmemdump(buf,len) debug_memdump (buf, len, 0); #define dmemdumpl(buf,len) debug_memdump (buf, len, 1);