Searching through splay trees may change the tree variable.
This commit is contained in:
parent
dc09f6fe89
commit
faaaa1ef38
2 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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 **);
|
||||
|
|
Loading…
Reference in a new issue