summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-05-05 23:16:01 -0400
committerTavian Barnes <tavianator@tavianator.com>2019-05-05 23:16:01 -0400
commita3c1c3ed54d9d595feb1df38e775af3d6ff9facd (patch)
tree4d7347b1cc073be521cb8f0d6e5b36ab5e091021 /eval.c
parentdf7d960b0d7e1f9bd8aa58654760e41b6282f78a (diff)
downloadbfs-a3c1c3ed54d9d595feb1df38e775af3d6ff9facd.tar.xz
color: Don't stat() if we don't need to
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/eval.c b/eval.c
index 0c4f9a9..7a9a1aa 100644
--- a/eval.c
+++ b/eval.c
@@ -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;
}