summaryrefslogtreecommitdiff
path: root/3rdparty/libconfig/libconfig.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/libconfig.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/libconfig.c')
-rw-r--r--3rdparty/libconfig/libconfig.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/3rdparty/libconfig/libconfig.c b/3rdparty/libconfig/libconfig.c
index 696f5fc08..5b6eaac73 100644
--- a/3rdparty/libconfig/libconfig.c
+++ b/3rdparty/libconfig/libconfig.c
@@ -49,8 +49,8 @@
#define CHUNK_SIZE 16
#define FLOAT_PRECISION DBL_DIG
-#define _new(T) (T *)calloc(1, sizeof(T)) /* zeroed */
-#define _delete(P) free((void *)(P))
+#define _new(T) calloc(1, sizeof(T)) /* zeroed */
+#define _delete(P) free(P)
/* ------------------------------------------------------------------------- */
@@ -567,7 +567,7 @@ static int __config_read(struct config_t *config, FILE *stream, const char *file
/* Reinitialize the config */
void (*destructor)(void *) = config->destructor;
- const char *include_dir = config->include_dir;
+ char *include_dir = config->include_dir;
unsigned short tab_width = config->tab_width;
int options = config->options;
@@ -743,7 +743,7 @@ int config_write_file(struct config_t *config, const char *filename)
void config_destroy(struct config_t *config)
{
unsigned int count = config->num_filenames;
- const char **f;
+ char **f;
__config_setting_destroy(config->root);