From c65ac64aa5628be2a03e1aebc22600bc22561154 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Sat, 11 Aug 2012 20:51:30 +0200 Subject: [PATCH] conf: make config types constant Config types are shared so they should never be modified. Hence, make them constant. Signed-off-by: David Herrmann --- src/conf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf.c b/src/conf.c index 45f1ff9..317ef18 100644 --- a/src/conf.c +++ b/src/conf.c @@ -62,7 +62,7 @@ struct conf_option { unsigned int flags; char short_name; const char *long_name; - struct conf_type *type; + const struct conf_type *type; void *mem; void *def; }; @@ -163,13 +163,13 @@ static void default_string(struct conf_option *opt) *(void**)opt->mem = opt->def; } -static struct conf_type conf_bool = { +static const struct conf_type conf_bool = { .parse = parse_bool, .free = NULL, .set_default = default_bool, }; -static struct conf_type conf_string = { +static const struct conf_type conf_string = { .parse = parse_string, .free = free_value, .set_default = default_string,