diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-09-20 14:29:04 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-09-20 14:29:04 +0000 |
commit | 3defe2094f5b028cbef9c3a2653d29ad4accccd9 (patch) | |
tree | 8cd19de914617420ae8fd8df440229f8f18c40e4 /usr.bin/grep | |
parent | e989f03415aea13c38c986c5db99b0192507aced (diff) |
That should be S_ISREG, dunno why I committed this wrong version;
spotted by hshoexer@
Diffstat (limited to 'usr.bin/grep')
-rw-r--r-- | usr.bin/grep/mmfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/grep/mmfile.c b/usr.bin/grep/mmfile.c index 2c55d24b81c..8e78360d9ac 100644 --- a/usr.bin/grep/mmfile.c +++ b/usr.bin/grep/mmfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mmfile.c,v 1.11 2006/09/19 05:52:23 otto Exp $ */ +/* $OpenBSD: mmfile.c,v 1.12 2006/09/20 14:29:03 otto Exp $ */ /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav @@ -55,7 +55,7 @@ mmopen(char *fn, char *mode) goto ouch2; if (st.st_size > SIZE_T_MAX) /* too big to mmap */ goto ouch2; - if (!S_ISDIR(st.st_mode)) /* only mmap regular files */ + if (!S_ISREG(st.st_mode)) /* only mmap regular files */ goto ouch2; mmf->len = (size_t)st.st_size; mmf->base = mmap(NULL, mmf->len, PROT_READ, MAP_PRIVATE, mmf->fd, (off_t)0); |