summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-04-24 23:38:52 -0400
committerTavian Barnes <tavianator@tavianator.com>2019-04-24 23:39:11 -0400
commitc2fb81bf1668e3c69df7d533c32a580742d709ab (patch)
tree53fe94b3e10704eccbdd639e52a1478d307ce3fa
parent0b9bf589a2762267fedf7321ba03968ebc3abfcd (diff)
downloadbfs-c2fb81bf1668e3c69df7d533c32a580742d709ab.tar.xz
parse: Add some missing costs/probabilities
Previously we weren't re-ordering -type in front of -newerXY
-rw-r--r--parse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/parse.c b/parse.c
index e6d58c5..2eb7eca 100644
--- a/parse.c
+++ b/parse.c
@@ -1658,6 +1658,8 @@ static struct expr *parse_newerxy(struct parser_state *state, int arg1, int arg2
expr->reftime = *reftime;
}
+ expr->cost = STAT_COST;
+
return expr;
fail:
@@ -1672,6 +1674,7 @@ static struct expr *parse_nogroup(struct parser_state *state, int arg1, int arg2
struct expr *expr = parse_nullary_test(state, eval_nogroup);
if (expr) {
expr->cost = 9000.0;
+ expr->probability = 0.01;
expr->ephemeral_fds = 1;
}
return expr;
@@ -1703,6 +1706,7 @@ static struct expr *parse_nouser(struct parser_state *state, int arg1, int arg2)
struct expr *expr = parse_nullary_test(state, eval_nouser);
if (expr) {
expr->cost = 9000.0;
+ expr->probability = 0.01;
expr->ephemeral_fds = 1;
}
return expr;