diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-11 16:06:58 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-11 16:06:58 +0000 |
commit | 5873167bed6dc905daa392461198d369afb038d1 (patch) | |
tree | 93e7e8ded2cb360af217c731fa8d504f6a88877e /usr.bin/xlint/lint2/mem2.c | |
parent | 538b4f2ad088ddc7997dcaf0b798b6684218cb42 (diff) |
-1 -> MAP_FAILED
Diffstat (limited to 'usr.bin/xlint/lint2/mem2.c')
-rw-r--r-- | usr.bin/xlint/lint2/mem2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/xlint/lint2/mem2.c b/usr.bin/xlint/lint2/mem2.c index 5a8abb258db..8b87e6cd282 100644 --- a/usr.bin/xlint/lint2/mem2.c +++ b/usr.bin/xlint/lint2/mem2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem2.c,v 1.2 1996/06/26 05:44:25 deraadt Exp $ */ +/* $OpenBSD: mem2.c,v 1.3 2001/05/11 16:06:57 art Exp $ */ /* $NetBSD: mem2.c,v 1.3 1995/10/02 17:27:11 jpo Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: mem2.c,v 1.2 1996/06/26 05:44:25 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mem2.c,v 1.3 2001/05/11 16:06:57 art Exp $"; #endif #include <sys/param.h> @@ -83,7 +83,7 @@ xalloc(sz) prot = PROT_READ | PROT_WRITE; flags = MAP_ANON | MAP_PRIVATE; mbuf = mmap(NULL, mblklen, prot, flags, -1, (off_t)0); - if (mbuf == (void *)-1) + if (mbuf == MAP_FAILED) err(1, "can't map memory"); if (ALIGN((u_long)mbuf) != (u_long)mbuf) errx(1, "mapped address is not aligned"); |