summaryrefslogtreecommitdiff
path: root/3rdparty/libconfig/grammar.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-02-20 21:13:19 +0100
committerHaru <haru@dotalux.com>2016-03-20 18:32:09 +0100
commit787d25edf045de8df1460a6a975186df0f8d402f (patch)
tree24c1597db832c93cf0c32840868028de0dea9192 /3rdparty/libconfig/grammar.c
parentddbaad9bbab30490a6b23ef74203f30d290aa17c (diff)
downloadhercules-787d25edf045de8df1460a6a975186df0f8d402f.tar.gz
hercules-787d25edf045de8df1460a6a975186df0f8d402f.tar.bz2
hercules-787d25edf045de8df1460a6a975186df0f8d402f.tar.xz
hercules-787d25edf045de8df1460a6a975186df0f8d402f.zip
Corrected some const-correctness errors in libconfig
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to '3rdparty/libconfig/grammar.c')
-rw-r--r--3rdparty/libconfig/grammar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/3rdparty/libconfig/grammar.c b/3rdparty/libconfig/grammar.c
index 7d5757b2f..6cd6fb722 100644
--- a/3rdparty/libconfig/grammar.c
+++ b/3rdparty/libconfig/grammar.c
@@ -95,7 +95,7 @@ extern int libconfig_yyget_lineno();
static const char *err_array_elem_type = "mismatched element type in array";
static const char *err_duplicate_setting = "duplicate setting name";
-#define _delete(P) free((void *)(P))
+#define _delete(P) free(P)
#define IN_ARRAY() \
(ctx->parent && (ctx->parent->type == CONFIG_TYPE_ARRAY))
@@ -1751,7 +1751,7 @@ yyreduce:
{
if(IN_ARRAY() || IN_LIST())
{
- const char *s = parsectx_take_string(ctx);
+ char *s = parsectx_take_string(ctx);
struct config_setting_t *e = config_setting_set_string_elem(ctx->parent, -1, s);
_delete(s);
@@ -1767,7 +1767,7 @@ yyreduce:
}
else
{
- const char *s = parsectx_take_string(ctx);
+ char *s = parsectx_take_string(ctx);
config_setting_set_string(ctx->setting, s);
_delete(s);
}