]> jfr.im git - irc/freenode/solanum.git/commitdiff
m_info: string constness
authorEd Kellett <redacted>
Mon, 9 Nov 2020 00:55:26 +0000 (00:55 +0000)
committerEd Kellett <redacted>
Mon, 9 Nov 2020 01:00:04 +0000 (01:00 +0000)
modules/m_info.c

index 693882f6cb1bb2dfdb6c45264c1d8e2fd6b4f6db..ecb9f7b394eba1fedd6b51c5b515a9b478d8a451 100644 (file)
@@ -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;
                }