summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2009-07-14 19:45:36 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2009-07-14 19:45:36 +0000
commit0fe0ed8bf88b8aed13fc4533e97b94d2919ac6d5 (patch)
treec7668a2a58d716a617574fb0350e77267a41f5ee
parentec71a417a88f887eaa947f4cb72e449413614185 (diff)
Notes
-rw-r--r--lib/libc/sys/mmap.24
-rw-r--r--sys/vm/vm_mmap.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/sys/mmap.2 b/lib/libc/sys/mmap.2
index 196d6aef77c2..91bf4e950aff 100644
--- a/lib/libc/sys/mmap.2
+++ b/lib/libc/sys/mmap.2
@@ -28,7 +28,7 @@
.\" @(#)mmap.2 8.4 (Berkeley) 5/11/95
.\" $FreeBSD$
.\"
-.Dd October 24, 2008
+.Dd July 14, 2009
.Dt MMAP 2
.Os
.Sh NAME
@@ -306,7 +306,7 @@ resides out of the valid address space for a user process.
The
.Fa len
argument
-was negative.
+was equal to zero.
.It Bq Er EINVAL
.Dv MAP_ANON
was specified and the
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c
index cc7a0f42c049..2b99e3653df3 100644
--- a/sys/vm/vm_mmap.c
+++ b/sys/vm/vm_mmap.c
@@ -229,7 +229,7 @@ mmap(td, uap)
fp = NULL;
/* make sure mapping fits into numeric range etc */
- if ((ssize_t) uap->len < 0 ||
+ if (uap->len == 0 ||
((flags & MAP_ANON) && uap->fd != -1))
return (EINVAL);