summaryrefslogtreecommitdiffstats
path: root/src/opt.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-08-15 16:51:45 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-08-15 16:52:34 -0400
commit9749af08293d16f3d5faedea371fdd3699f2adf2 (patch)
tree3ea0cfdad551b976aca81a5ea2344a116c8f778e /src/opt.c
parent50dd5af226853d8d7201c7478d13f773cfd1479e (diff)
downloadbfs-9749af08293d16f3d5faedea371fdd3699f2adf2.tar.xz
expr: Tell expressions what kind of expression they are
Diffstat (limited to 'src/opt.c')
-rw-r--r--src/opt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/opt.c b/src/opt.c
index 293a2f7..719c975 100644
--- a/src/opt.c
+++ b/src/opt.c
@@ -1337,7 +1337,7 @@ static struct bfs_expr *opt_const(struct bfs_opt *opt, bool value) {
static bfs_eval_fn *const fns[] = {eval_false, eval_true};
static char *fake_args[] = {"-false", "-true"};
- struct bfs_expr *expr = bfs_expr_new(opt->ctx, fns[value], 1, &fake_args[value]);
+ struct bfs_expr *expr = bfs_expr_new(opt->ctx, fns[value], 1, &fake_args[value], BFS_TEST);
return visit_shallow(opt, expr, &annotate);
}
@@ -1351,7 +1351,7 @@ static struct bfs_expr *negate_expr(struct bfs_opt *opt, struct bfs_expr *expr,
return opt_const(opt, true);
}
- struct bfs_expr *ret = bfs_expr_new(opt->ctx, eval_not, 1, argv);
+ struct bfs_expr *ret = bfs_expr_new(opt->ctx, eval_not, 1, argv, BFS_OPERATOR);
if (!ret) {
return NULL;
}