diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2019-05-05 23:16:01 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2019-05-05 23:16:01 -0400 |
commit | a3c1c3ed54d9d595feb1df38e775af3d6ff9facd (patch) | |
tree | 4d7347b1cc073be521cb8f0d6e5b36ab5e091021 /eval.c | |
parent | df7d960b0d7e1f9bd8aa58654760e41b6282f78a (diff) | |
download | bfs-a3c1c3ed54d9d595feb1df38e775af3d6ff9facd.tar.xz |
color: Don't stat() if we don't need to
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -700,15 +700,9 @@ error: * -f?print action. */ bool eval_fprint(const struct expr *expr, struct eval_state *state) { - CFILE *cfile = expr->cfile; - if (cfile->colors) { - eval_stat(state); - } - - if (cfprintf(cfile, "%pP\n", state->ftwbuf) < 0) { + if (cfprintf(expr->cfile, "%pP\n", state->ftwbuf) < 0) { eval_report_error(state); } - return true; } |