From 50aea7c94ba2c3a3e9dd9467ff6eeefb98412fc6 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sun, 27 Jan 2008 00:22:44 +0200 Subject: [PATCH] config: more const in elinks.conf parsing (cherry picked from commit 9becd108a8e1dfcfda8c84db6c91a1c6cd5bc7c7) --- src/config/conf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config/conf.c b/src/config/conf.c index e64fe6bc..5858854a 100644 --- a/src/config/conf.c +++ b/src/config/conf.c @@ -329,13 +329,13 @@ parse_include(struct option *opt_tree, unsigned char **file, int *line, struct parse_handler { - unsigned char *command; + const unsigned char *command; enum parse_error (*handler)(struct option *opt_tree, unsigned char **file, int *line, struct string *mirror, int is_system_conf); }; -static struct parse_handler parse_handlers[] = { +static const struct parse_handler parse_handlers[] = { { "set", parse_set }, { "unset", parse_unset }, { "bind", parse_bind }, @@ -348,7 +348,7 @@ enum parse_error parse_config_command(struct option *options, unsigned char **file, int *line, struct string *mirror, int is_system_conf) { - struct parse_handler *handler; + const struct parse_handler *handler; for (handler = parse_handlers; handler->command; handler++) { @@ -390,7 +390,7 @@ parse_config_file(struct option *options, unsigned char *name, int error_occurred = 0; enum parse_error err = 0; enum verbose_level verbose = get_cmd_opt_int("verbose"); - unsigned char error_msg[][40] = { + static const unsigned char error_msg[][40] = { "no error", "parse error", "unknown command", -- 2.11.4.GIT