From fd27919f91df1b87c81cb77365865d7a2e630799 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sun, 28 Jan 2007 02:05:52 +0200 Subject: [PATCH] add_format_to_string: Let format point to const. --- src/util/string.c | 2 +- src/util/string.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/string.c b/src/util/string.c index 06f563c97..4a436ccff 100644 --- a/src/util/string.c +++ b/src/util/string.c @@ -434,7 +434,7 @@ add_xchar_to_string(struct string *string, unsigned char character, int times) /* Add printf-like format string to @string. */ struct string * -add_format_to_string(struct string *string, unsigned char *format, ...) +add_format_to_string(struct string *string, const unsigned char *format, ...) { int newlength; int width; diff --git a/src/util/string.h b/src/util/string.h index c96fb2de2..059a8c191 100644 --- a/src/util/string.h +++ b/src/util/string.h @@ -174,7 +174,7 @@ struct string *string_concat(struct string *string, ...); struct string *add_xchar_to_string(struct string *string, unsigned char character, int times); /* Add printf-style format string to @string. */ -struct string *add_format_to_string(struct string *string, unsigned char *format, ...); +struct string *add_format_to_string(struct string *string, const unsigned char *format, ...); /* Get a regular newly allocated stream of bytes from @string. */ static unsigned char *squeezastring(struct string *string);