summaryrefslogtreecommitdiffstats
path: root/src/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/expr.c b/src/expr.c
index 110e9b7..ca37ffc 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -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);
}
}