summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-04-20 12:05:43 -0400
committerTavian Barnes <tavianator@tavianator.com>2019-04-20 12:16:18 -0400
commit4eeae2264cf32e67a0aac46293752251328e2745 (patch)
tree2591dd7df8d6d2f2d3869872d031c854c8e8e440 /parse.c
parent36f690a4400022b938542e1feb6dd905208ff55c (diff)
downloadbfs-4eeae2264cf32e67a0aac46293752251328e2745.tar.xz
trie: Make trie_remove() take a leaf instead of a key
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.c b/parse.c
index f60a963..e2a3dbf 100644
--- a/parse.c
+++ b/parse.c
@@ -274,7 +274,7 @@ int free_cmdline(struct cmdline *cmdline) {
}
free(ofile);
- trie_remove_mem(&cmdline->open_files, leaf->key, leaf->length);
+ trie_remove(&cmdline->open_files, leaf);
}
trie_destroy(&cmdline->open_files);
@@ -438,7 +438,7 @@ static int expr_open(struct parser_state *state, struct expr *expr, const char *
struct open_file *ofile = malloc(sizeof(*ofile));
if (!ofile) {
perror("malloc()");
- trie_remove_mem(&cmdline->open_files, leaf->key, leaf->length);
+ trie_remove(&cmdline->open_files, leaf);
goto out_close;
}