mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-14 20:37:06 +00:00
grep: remove tautological condition
st_size is an off_t, it cannot hold values larger than OFF_MAX. CID: 1008931
This commit is contained in:
parent
c816aea7ab
commit
b617584942
|
@ -186,8 +186,7 @@ grep_open(const char *path)
|
|||
if (filebehave == FILE_MMAP) {
|
||||
struct stat st;
|
||||
|
||||
if ((fstat(f->fd, &st) == -1) || (st.st_size > OFF_MAX) ||
|
||||
(!S_ISREG(st.st_mode)))
|
||||
if (fstat(f->fd, &st) == -1 || !S_ISREG(st.st_mode))
|
||||
filebehave = FILE_STDIO;
|
||||
else {
|
||||
int flags = MAP_PRIVATE | MAP_NOCORE | MAP_NOSYNC;
|
||||
|
|
Loading…
Reference in a new issue