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:
Kyle Evans 2023-03-08 23:53:10 -06:00
parent c816aea7ab
commit b617584942

View file

@ -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;