From: Guus Sliepen Date: Wed, 4 May 2005 15:52:55 +0000 (+0000) Subject: Searching through splay trees may change the tree variable. X-Git-Tag: release-1.0.4~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=faaaa1ef38dcdf19d5d5d73ab66806b15467c043;p=oweals%2Ftinc.git Searching through splay trees may change the tree variable. --- diff --git a/src/conf.c b/src/conf.c index 466016c..71132c4 100644 --- a/src/conf.c +++ b/src/conf.c @@ -99,7 +99,7 @@ void config_add(avl_tree_t *config_tree, config_t *cfg) avl_insert(config_tree, cfg); } -config_t *lookup_config(const avl_tree_t *config_tree, char *variable) +config_t *lookup_config(avl_tree_t *config_tree, char *variable) { config_t cfg, *found; @@ -120,7 +120,7 @@ config_t *lookup_config(const avl_tree_t *config_tree, char *variable) return found; } -config_t *lookup_config_next(const avl_tree_t *config_tree, const config_t *cfg) +config_t *lookup_config_next(avl_tree_t *config_tree, const config_t *cfg) { avl_node_t *node; config_t *found; diff --git a/src/conf.h b/src/conf.h index 0755f8b..e637bde 100644 --- a/src/conf.h +++ b/src/conf.h @@ -47,8 +47,8 @@ extern void exit_configuration(avl_tree_t **); extern config_t *new_config(void) __attribute__ ((__malloc__)); extern void free_config(config_t *); extern void config_add(avl_tree_t *, config_t *); -extern config_t *lookup_config(const avl_tree_t *, char *); -extern config_t *lookup_config_next(const avl_tree_t *, const config_t *); +extern config_t *lookup_config(avl_tree_t *, char *); +extern config_t *lookup_config_next(avl_tree_t *, const config_t *); extern bool get_config_bool(const config_t *, bool *); extern bool get_config_int(const config_t *, int *); extern bool get_config_string(const config_t *, char **);