summaryrefslogtreecommitdiffstats
path: root/src/bftw.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-02-05 13:54:01 -0500
committerTavian Barnes <tavianator@tavianator.com>2024-02-05 13:56:12 -0500
commit10b6da04521cf3f65f3c47bece8e2e5e6e664d6d (patch)
treed9e8e27a73c8bf4ee3ebf78e5a3c09ce5fe184e9 /src/bftw.c
parentdab66643f54d0f79c212db9e68d8545b98a2d653 (diff)
downloadbfs-10b6da04521cf3f65f3c47bece8e2e5e6e664d6d.tar.xz
mtab: Take the basename directly in bfs_might_be_mount()
This avoids some hot xbaseoff() calls.
Diffstat (limited to 'src/bftw.c')
-rw-r--r--src/bftw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bftw.c b/src/bftw.c
index debf92c..d392aed 100644
--- a/src/bftw.c
+++ b/src/bftw.c
@@ -1390,7 +1390,7 @@ static bool bftw_need_stat(const struct bftw_state *state) {
// need to stat() to get the correct type. We don't need to
// check for directories because they can only be mounted over
// by other directories.
- if (bfs_might_be_mount(state->mtab, ftwbuf->path)) {
+ if (bfs_might_be_mount(state->mtab, ftwbuf->path + ftwbuf->nameoff)) {
return true;
}
#endif