From faaaa1ef38dcdf19d5d5d73ab66806b15467c043 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Wed, 4 May 2005 15:52:55 +0000 Subject: [PATCH] Searching through splay trees may change the tree variable. --- src/conf.c | 4 ++-- src/conf.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/conf.c b/src/conf.c index 466016c1..71132c43 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 0755f8b6..e637bde8 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 **); -- 2.39.5