summaryrefslogtreecommitdiffstats
path: root/src/mtab.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/mtab.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/mtab.c')
-rw-r--r--src/mtab.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mtab.c b/src/mtab.c
index cc726a2..c76f403 100644
--- a/src/mtab.c
+++ b/src/mtab.c
@@ -271,8 +271,7 @@ const char *bfs_fstype(const struct bfs_mtab *mtab, const struct bfs_stat *statb
}
}
-bool bfs_might_be_mount(const struct bfs_mtab *mtab, const char *path) {
- const char *name = path + xbaseoff(path);
+bool bfs_might_be_mount(const struct bfs_mtab *mtab, const char *name) {
return trie_find_str(&mtab->names, name);
}