From 78744107424ef1cee9294f0e09cdcf615693b8f3 Mon Sep 17 00:00:00 2001 From: Ed Kellett Date: Mon, 9 Nov 2020 00:55:26 +0000 Subject: [PATCH] m_info: string constness --- modules/m_info.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/m_info.c b/modules/m_info.c index 693882f6..ecb9f7b3 100644 --- a/modules/m_info.c +++ b/modules/m_info.c @@ -94,8 +94,8 @@ struct InfoStruct { const int *int_; const bool *bool_; - char **string_p; - char *string; + char *const *string_p; + const char *string; } option; }; @@ -732,20 +732,20 @@ send_conf_options(struct Client *source_p) for (i = 0; info_table[i].name; i++) { static char opt_buf[BUFSIZE]; - char *opt_value = opt_buf; + const char *opt_value = opt_buf; switch (info_table[i].output_type) { case OUTPUT_STRING: { - char *option = *info_table[i].option.string_p; + const char *option = *info_table[i].option.string_p; opt_value = option != NULL ? option : "NONE"; break; } case OUTPUT_STRING_PTR: { - char *option = info_table[i].option.string; + const char *option = info_table[i].option.string; opt_value = option != NULL ? option : "NONE"; break; }