summaryrefslogtreecommitdiffstats
path: root/src/color.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-08-31 10:16:35 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-08-31 10:16:35 -0400
commit345047be5b8766a9763d4a717ff034e4e4083ade (patch)
treed1865a39269919087ace15184643907a56d62090 /src/color.c
parent5f736eada55f84c7499103faf7c181b80eb7092f (diff)
downloadbfs-345047be5b8766a9763d4a717ff034e4e4083ade.tar.xz
trie: New trie_clear() function
Diffstat (limited to 'src/color.c')
-rw-r--r--src/color.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/color.c b/src/color.c
index f7a5d86..b9a788b 100644
--- a/src/color.c
+++ b/src/color.c
@@ -326,8 +326,7 @@ fail:
/** Rebuild the case-insensitive trie after all extensions have been parsed. */
static int build_iext_trie(struct colors *colors) {
- trie_destroy(&colors->iext_trie);
- trie_init(&colors->iext_trie);
+ trie_clear(&colors->iext_trie);
TRIE_FOR_EACH(&colors->ext_trie, leaf) {
size_t len = leaf->length - 1;