diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-09-19 12:14:06 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-09-19 12:14:06 -0400 |
commit | cf2eb17c48a23d49bf517df58e34e30529c16576 (patch) | |
tree | e746c589fb25d62bdc7ea9803a8f2e983b563ba5 /src/expr.c | |
parent | 5307ef2ed38b665892798aa10295dd68401a38df (diff) | |
download | bfs-cf2eb17c48a23d49bf517df58e34e30529c16576.tar.xz |
list: New drain_slist() macro
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -68,8 +68,7 @@ void bfs_expr_append(struct bfs_expr *expr, struct bfs_expr *child) { } void bfs_expr_extend(struct bfs_expr *expr, struct bfs_exprs *children) { - while (!SLIST_EMPTY(children)) { - struct bfs_expr *child = SLIST_POP(children); + drain_slist (struct bfs_expr, child, children) { bfs_expr_append(expr, child); } } |