summaryrefslogtreecommitdiffstats
path: root/src/trie.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/trie.h')
-rw-r--r--src/trie.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/trie.h b/src/trie.h
index dfaae15..2f51db5 100644
--- a/src/trie.h
+++ b/src/trie.h
@@ -6,6 +6,7 @@
#include "config.h"
#include "alloc.h"
+#include "list.h"
#include <stddef.h>
#include <stdint.h>
@@ -141,9 +142,7 @@ void trie_destroy(struct trie *trie);
/**
* Iterate over the leaves of a trie.
*/
-#define TRIE_FOR_EACH(trie, leaf) \
- for (struct trie_leaf *leaf = (trie)->head, *_next; \
- leaf && (_next = leaf->next, true); \
- leaf = _next)
+#define for_trie(leaf, trie) \
+ for_list(struct trie_leaf, leaf, trie)
#endif // BFS_TRIE_H