diff --git a/usr.bin/locate/locate/fastfind.c b/usr.bin/locate/locate/fastfind.c index 68f8a86d2b2..8e29355857b 100644 --- a/usr.bin/locate/locate/fastfind.c +++ b/usr.bin/locate/locate/fastfind.c @@ -219,11 +219,12 @@ fastfind p = path + count; foundchar = p - 1; - for (;;) { #ifdef FF_MMAP + for (; len > 0;) { c = (u_char)*paddr++; len--; #else + for (;;) { c = getc(fp); #endif /* FF_MMAP */ /*