Add const to a param msg at functions log_msg, log_rl, die, bug and debug

This commit is contained in:
Pavel Tvrdik 2014-12-03 10:57:31 +01:00 committed by Ondrej Zajicek
parent 4a591d4b94
commit e598853e68
3 changed files with 13 additions and 13 deletions

View file

@ -17,7 +17,7 @@
/* Client versions of logging functions */ /* Client versions of logging functions */
static void static void
vlog(char *msg, va_list args) vlog(const char *msg, va_list args)
{ {
char buf[1024]; char buf[1024];
@ -28,7 +28,7 @@ vlog(char *msg, va_list args)
} }
void void
bug(char *msg, ...) bug(const char *msg, ...)
{ {
va_list args; va_list args;
@ -41,7 +41,7 @@ bug(char *msg, ...)
} }
void void
die(char *msg, ...) die(const char *msg, ...)
{ {
va_list args; va_list args;

View file

@ -128,10 +128,10 @@ typedef struct buffer {
#define log log_msg #define log log_msg
void log_commit(int class, buffer *buf); void log_commit(int class, buffer *buf);
void log_msg(char *msg, ...); void log_msg(const char *msg, ...);
void log_rl(struct tbf *rl, char *msg, ...); void log_rl(struct tbf *rl, const char *msg, ...);
void die(char *msg, ...) NORET; void die(const char *msg, ...) NORET;
void bug(char *msg, ...) NORET; void bug(const char *msg, ...) NORET;
#define L_DEBUG "\001" /* Debugging messages */ #define L_DEBUG "\001" /* Debugging messages */
#define L_TRACE "\002" /* Protocol tracing */ #define L_TRACE "\002" /* Protocol tracing */
@ -143,7 +143,7 @@ void bug(char *msg, ...) NORET;
#define L_FATAL "\010" /* Fatal errors */ #define L_FATAL "\010" /* Fatal errors */
#define L_BUG "\011" /* BIRD bugs */ #define L_BUG "\011" /* BIRD bugs */
void debug(char *msg, ...); /* Printf to debug output */ void debug(const char *msg, ...); /* Printf to debug output */
/* Debugging */ /* Debugging */

View file

@ -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(). * It is essentially a sequence of log_reset(), logn() and log_commit().
*/ */
void void
log_msg(char *msg, ...) log_msg(const char *msg, ...)
{ {
int class = 1; int class = 1;
va_list args; va_list args;
@ -176,7 +176,7 @@ log_msg(char *msg, ...)
} }
void void
log_rl(struct tbf *f, char *msg, ...) log_rl(struct tbf *f, const char *msg, ...)
{ {
int last_hit = f->mark; int last_hit = f->mark;
int class = 1; int class = 1;
@ -202,7 +202,7 @@ log_rl(struct tbf *f, char *msg, ...)
* of the program. * of the program.
*/ */
void void
bug(char *msg, ...) bug(const char *msg, ...)
{ {
va_list args; va_list args;
@ -219,7 +219,7 @@ bug(char *msg, ...)
* of the program. * of the program.
*/ */
void void
die(char *msg, ...) die(const char *msg, ...)
{ {
va_list args; va_list args;
@ -236,7 +236,7 @@ die(char *msg, ...)
* to the debugging output. No newline character is appended. * to the debugging output. No newline character is appended.
*/ */
void void
debug(char *msg, ...) debug(const char *msg, ...)
{ {
va_list args; va_list args;
char buf[1024]; char buf[1024];