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 | |
parent | 538b4f2ad088ddc7997dcaf0b798b6684218cb42 (diff) |
-1 -> MAP_FAILED
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/xlint/lint1/mem1.c | 6 | ||||
-rw-r--r-- | usr.bin/xlint/lint2/mem2.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/xlint/lint1/mem1.c b/usr.bin/xlint/lint1/mem1.c index 23305299cc4..0e498a85c2a 100644 --- a/usr.bin/xlint/lint1/mem1.c +++ b/usr.bin/xlint/lint1/mem1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem1.c,v 1.2 1996/06/26 05:44:17 deraadt Exp $ */ +/* $OpenBSD: mem1.c,v 1.3 2001/05/11 16:06:06 art Exp $ */ /* $NetBSD: mem1.c,v 1.2 1995/07/03 21:24:25 cgd Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: mem1.c,v 1.2 1996/06/26 05:44:17 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mem1.c,v 1.3 2001/05/11 16:06:06 art Exp $"; #endif #include <sys/types.h> @@ -181,7 +181,7 @@ xnewblk() prot = PROT_READ | PROT_WRITE; flags = MAP_ANON | MAP_PRIVATE; mb->blk = mmap(NULL, mblklen, prot, flags, -1, (off_t)0); - if (mb->blk == (void *)-1) + if (mb->blk == MAP_FAILED) err(1, "can't map memory"); if (ALIGN((u_long)mb->blk) != (u_long)mb->blk) errx(1, "mapped address is not aligned"); 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"); |