From 35cdc5b562dc2c8c843637cd88cf5404c5efc538 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 29 Jul 2013 17:47:00 +0200 Subject: char* constness cleanup in config parser --- src/config.y | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/config.y') diff --git a/src/config.y b/src/config.y index 75f2019..65e95b3 100644 --- a/src/config.y +++ b/src/config.y @@ -41,12 +41,13 @@ %union { int num; fastd_string_stack_t *str; - char *error; bool boolean; fastd_tristate_t tristate; struct in_addr addr4; struct in6_addr addr6; fastd_peer_address_t addr; + + const char *error; } %token START_CONFIG @@ -123,7 +124,7 @@ #include #include - void fastd_config_error(YYLTYPE *loc, fastd_context_t *ctx, fastd_config_t *conf, const char *filename, int depth, char *s); + void fastd_config_error(YYLTYPE *loc, fastd_context_t *ctx, fastd_config_t *conf, const char *filename, int depth, const char *s); } @@ -535,6 +536,6 @@ port: colon_or_port TOK_INTEGER { ; %% -void fastd_config_error(YYLTYPE *loc, fastd_context_t *ctx, fastd_config_t *conf, const char *filename, int depth, char *s) { +void fastd_config_error(YYLTYPE *loc, fastd_context_t *ctx, fastd_config_t *conf, const char *filename, int depth, const char *s) { pr_error(ctx, "config error: %s at %s:%i:%i", s, filename, loc->first_line, loc->first_column); } -- cgit v1.2.3