diff --git a/client/util.c b/client/util.c index 451bb60c..050224b9 100644 --- a/client/util.c +++ b/client/util.c @@ -17,7 +17,7 @@ /* Client versions of logging functions */ static void -vlog(char *msg, va_list args) +vlog(const char *msg, va_list args) { char buf[1024]; @@ -28,7 +28,7 @@ vlog(char *msg, va_list args) } void -bug(char *msg, ...) +bug(const char *msg, ...) { va_list args; @@ -41,7 +41,7 @@ bug(char *msg, ...) } void -die(char *msg, ...) +die(const char *msg, ...) { va_list args; diff --git a/lib/birdlib.h b/lib/birdlib.h index 84a6c1b4..d107c399 100644 --- a/lib/birdlib.h +++ b/lib/birdlib.h @@ -128,10 +128,10 @@ typedef struct buffer { #define log log_msg void log_commit(int class, buffer *buf); -void log_msg(char *msg, ...); -void log_rl(struct tbf *rl, char *msg, ...); -void die(char *msg, ...) NORET; -void bug(char *msg, ...) NORET; +void log_msg(const char *msg, ...); +void log_rl(struct tbf *rl, const char *msg, ...); +void die(const char *msg, ...) NORET; +void bug(const char *msg, ...) NORET; #define L_DEBUG "\001" /* Debugging messages */ #define L_TRACE "\002" /* Protocol tracing */ @@ -143,7 +143,7 @@ void bug(char *msg, ...) NORET; #define L_FATAL "\010" /* Fatal errors */ #define L_BUG "\011" /* BIRD bugs */ -void debug(char *msg, ...); /* Printf to debug output */ +void debug(const char *msg, ...); /* Printf to debug output */ /* Debugging */ diff --git a/sysdep/unix/log.c b/sysdep/unix/log.c index 3ae98df8..7cb26360 100644 --- a/sysdep/unix/log.c +++ b/sysdep/unix/log.c @@ -163,7 +163,7 @@ vlog(int class, const char *msg, va_list args) * It is essentially a sequence of log_reset(), logn() and log_commit(). */ void -log_msg(char *msg, ...) +log_msg(const char *msg, ...) { int class = 1; va_list args; @@ -176,7 +176,7 @@ log_msg(char *msg, ...) } void -log_rl(struct tbf *f, char *msg, ...) +log_rl(struct tbf *f, const char *msg, ...) { int last_hit = f->mark; int class = 1; @@ -202,7 +202,7 @@ log_rl(struct tbf *f, char *msg, ...) * of the program. */ void -bug(char *msg, ...) +bug(const char *msg, ...) { va_list args; @@ -219,7 +219,7 @@ bug(char *msg, ...) * of the program. */ void -die(char *msg, ...) +die(const char *msg, ...) { va_list args; @@ -236,7 +236,7 @@ die(char *msg, ...) * to the debugging output. No newline character is appended. */ void -debug(char *msg, ...) +debug(const char *msg, ...) { va_list args; char buf[1024];