From 10b6da04521cf3f65f3c47bece8e2e5e6e664d6d Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 5 Feb 2024 13:54:01 -0500 Subject: mtab: Take the basename directly in bfs_might_be_mount() This avoids some hot xbaseoff() calls. --- src/bftw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bftw.c') 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 -- cgit v1.2.3