From 74b91fad28571e387caca9924bf5d261cf6523ba Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 7 Aug 2008 14:02:32 +0000 Subject: [PATCH] * more strict const --- lib/config/config.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/config/config.c b/lib/config/config.c index 1fb7e9b05..499b5fae4 100644 --- a/lib/config/config.c +++ b/lib/config/config.c @@ -1011,7 +1011,7 @@ float find_config_tree_float(struct cmd_context *cmd, const char *path, return _find_config_float(cmd->cft_override ? cmd->cft_override->root : NULL, cmd->cft->root, path, fail); } -static int _str_in_array(const char *str, const char *values[]) +static int _str_in_array(const char *str, const char * const values[]) { int i; @@ -1024,9 +1024,8 @@ static int _str_in_array(const char *str, const char *values[]) static int _str_to_bool(const char *str, int fail) { - static const char *_true_values[] = { "y", "yes", "on", "true", NULL }; - static const char *_false_values[] = - { "n", "no", "off", "false", NULL }; + const char * const _true_values[] = { "y", "yes", "on", "true", NULL }; + const char * const _false_values[] = { "n", "no", "off", "false", NULL }; if (_str_in_array(str, _true_values)) return 1;