summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2017-09-17 10:49:00 -0400
committerTavian Barnes <tavianator@tavianator.com>2017-09-17 10:49:00 -0400
commit86d790e134d5a12e569e1d78804bc5a54ca9ed25 (patch)
tree5c1d85cf208760553a675be13af19e029e5f48c0 /eval.c
parent768f8a6111ee25a1035d572e58e14c31d7bf5e23 (diff)
downloadbfs-86d790e134d5a12e569e1d78804bc5a54ca9ed25.tar.xz
opt: Move some aggressive optimizations back to -O4
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/eval.c b/eval.c
index 5196b57..08d2643 100644
--- a/eval.c
+++ b/eval.c
@@ -1091,7 +1091,7 @@ static enum bftw_action cmdline_callback(struct BFTW *ftwbuf, void *ptr) {
goto done;
}
- if (ftwbuf->depth >= cmdline->maxdepth) {
+ if (cmdline->maxdepth < 0 || ftwbuf->depth >= cmdline->maxdepth) {
state.action = BFTW_SKIP_SUBTREE;
}
@@ -1216,13 +1216,6 @@ int eval_cmdline(const struct cmdline *cmdline) {
return EXIT_SUCCESS;
}
- if (cmdline->optlevel >= 4 && cmdline->expr->eval == eval_false) {
- if (cmdline->debug & DEBUG_OPT) {
- fputs("-O4: skipping evaluation of top-level -false\n", stderr);
- }
- return EXIT_SUCCESS;
- }
-
int nopenfd = infer_fdlimit(cmdline);
struct callback_args args = {