Skip to content
Browse files

That should be S_ISREG, dunno why I committed this wrong version;

spotted by hshoexer@
  • Loading branch information...
1 parent a2c7fdf commit d1068d89108c98799b73ba6cbc72b3b2f1156a13 Otto Moerbeek committed with
Showing with 2 additions and 2 deletions.
  1. +2 −2 mmfile.c
View
4 mmfile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mmfile.c,v 1.10 2006/02/09 09:54:47 otto Exp $ */
+/* $OpenBSD: mmfile.c,v 1.11 2006/09/19 05:52:23 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);

0 comments on commit d1068d8

Please sign in to comment.
Something went wrong with that request. Please try again.