summaryrefslogtreecommitdiffstats
path: root/bftw.c
diff options
context:
space:
mode:
Diffstat (limited to 'bftw.c')
-rw-r--r--bftw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bftw.c b/bftw.c
index 0e541c6..8d561ff 100644
--- a/bftw.c
+++ b/bftw.c
@@ -426,7 +426,7 @@ static int bftw_file_open(struct bftw_cache *cache, struct bftw_file *file, cons
// Handle ENAMETOOLONG by manually traversing the path component-by-component
// -1 to include the root, which has depth == 0
- size_t offset = base ? base->depth : -1;
+ size_t offset = base ? base->depth : (size_t)-1;
size_t levels = file->depth - offset;
if (levels < 2) {
return fd;