summaryrefslogtreecommitdiffstats
path: root/mtab.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 /mtab.c
parent36f690a4400022b938542e1feb6dd905208ff55c (diff)
downloadbfs-4eeae2264cf32e67a0aac46293752251328e2745.tar.xz
trie: Make trie_remove() take a leaf instead of a key
Diffstat (limited to 'mtab.c')
-rw-r--r--mtab.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mtab.c b/mtab.c
index ed80030..63c04ac 100644
--- a/mtab.c
+++ b/mtab.c
@@ -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);