diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2019-04-20 12:05:43 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2019-04-20 12:16:18 -0400 |
commit | 4eeae2264cf32e67a0aac46293752251328e2745 (patch) | |
tree | 2591dd7df8d6d2f2d3869872d031c854c8e8e440 /parse.c | |
parent | 36f690a4400022b938542e1feb6dd905208ff55c (diff) | |
download | bfs-4eeae2264cf32e67a0aac46293752251328e2745.tar.xz |
trie: Make trie_remove() take a leaf instead of a key
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } |