summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2017-08-22 18:34:36 -0400
committerTavian Barnes <tavianator@tavianator.com>2017-08-22 18:37:23 -0400
commitd548b86e120db7e1327eea957a698d4bb874a1fb (patch)
tree874e34926ee12fbbf076a834d6822ab751cf378b /parse.c
parent2a561b66f48ab4deafb0a031cad3ad541ea79449 (diff)
downloadbfs-d548b86e120db7e1327eea957a698d4bb874a1fb.tar.xz
Avoid multiple extra stat()s of broken symlinks for -xtype
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index ef252fb..4624e7e 100644
--- a/parse.c
+++ b/parse.c
@@ -345,7 +345,7 @@ static int stat_arg(const struct parser_state *state, struct expr *expr, struct
bool follow = cmdline->flags & (BFTW_COMFOLLOW | BFTW_LOGICAL);
int flags = follow ? 0 : AT_SYMLINK_NOFOLLOW;
- int ret = xfstatat(AT_FDCWD, expr->sdata, sb, &flags);
+ int ret = xfstatat(AT_FDCWD, expr->sdata, sb, flags);
if (ret != 0) {
cfprintf(cmdline->cerr, "%{er}error: '%s': %s%{rs}\n", expr->sdata, strerror(errno));
}