summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-12-21 05:52:47 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-12-21 05:52:47 +0000
commit68874fd1c2a9f854ff278d134f9b2c4960f1a2fc (patch)
treedc4c3511571e05b5df033fae9286e6581a93ff7f
parentf3adf21615fa14b2775b9a923500d1c4aac46c5d (diff)
Use MAP_PRIVATE for mmap() flags instead of 0. With UVM this defaults
to MAP_PRIVATE anyway but we want to avoid the kernel complaining...
-rw-r--r--usr.bin/look/look.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/look/look.c b/usr.bin/look/look.c
index 7be948301df..0e2c5a98a19 100644
--- a/usr.bin/look/look.c
+++ b/usr.bin/look/look.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: look.c,v 1.3 1997/01/15 23:42:48 millert Exp $ */
+/* $OpenBSD: look.c,v 1.4 1999/12/21 05:52:46 millert Exp $ */
/* $NetBSD: look.c,v 1.7 1995/08/31 22:41:02 jtc Exp $ */
/*-
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)look.c 8.2 (Berkeley) 5/4/95";
#endif
-static char rcsid[] = "$OpenBSD: look.c,v 1.3 1997/01/15 23:42:48 millert Exp $";
+static char rcsid[] = "$OpenBSD: look.c,v 1.4 1999/12/21 05:52:46 millert Exp $";
#endif /* not lint */
/*
@@ -148,7 +148,7 @@ main(argc, argv)
if (sb.st_size > SIZE_T_MAX)
err(2, "%s: %s", file, strerror(EFBIG));
if ((front = mmap(NULL,
- (size_t)sb.st_size, PROT_READ, 0, fd, (off_t)0)) == NULL)
+ (size_t)sb.st_size, PROT_READ, MAP_PRIVATE, fd, (off_t)0)) == NULL)
err(2, "%s", file);
back = front + sb.st_size;
exit(look(string, front, back));