From 66614acbc044515f2062212e0fa82e4372d1a86a Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sun, 28 Jan 2007 01:50:06 +0200 Subject: [PATCH] add_file_to_string: Let filename 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 c6d1a9077..088374aa0 100644 --- a/src/util/string.c +++ b/src/util/string.c @@ -332,7 +332,7 @@ add_string_to_string(struct string *string, const struct string *from) } struct string * -add_file_to_string(struct string *string, unsigned char *filename) +add_file_to_string(struct string *string, const unsigned char *filename) { FILE *file; off_t filelen; diff --git a/src/util/string.h b/src/util/string.h index 155f0f93d..c96fb2de2 100644 --- a/src/util/string.h +++ b/src/util/string.h @@ -164,7 +164,7 @@ struct string *add_to_string(struct string *string, const unsigned char *source); struct string *add_char_to_string(struct string *string, unsigned char character); struct string *add_string_to_string(struct string *to, const struct string *from); -struct string *add_file_to_string(struct string *string, unsigned char *filename); +struct string *add_file_to_string(struct string *string, const unsigned char *filename); struct string *add_crlf_to_string(struct string *string); /* Adds each C string to @string until a terminating NULL is met. */