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 */
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;

View file

@ -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 */

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().
*/
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];