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 /mtab.c | |
parent | 36f690a4400022b938542e1feb6dd905208ff55c (diff) | |
download | bfs-4eeae2264cf32e67a0aac46293752251328e2745.tar.xz |
trie: Make trie_remove() take a leaf instead of a key
Diffstat (limited to 'mtab.c')
-rw-r--r-- | mtab.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -77,7 +77,7 @@ static int bfs_mtab_add(struct bfs_mtab *mtab, const char *path, dev_t dev, cons if (leaf->value) { return 0; } else { - trie_remove_mem(&mtab->types, leaf->key, leaf->length); + trie_remove(&mtab->types, leaf); return -1; } } @@ -220,7 +220,7 @@ void free_bfs_mtab(struct bfs_mtab *mtab) { struct trie_leaf *leaf; while ((leaf = trie_first_leaf(&mtab->types))) { free(leaf->value); - trie_remove_mem(&mtab->types, leaf->key, leaf->length); + trie_remove(&mtab->types, leaf); } trie_destroy(&mtab->types); |