summaryrefslogtreecommitdiffstats
path: root/usr.bin/xlint
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/xlint')
-rw-r--r--usr.bin/xlint/lint1/mem1.c2
-rw-r--r--usr.bin/xlint/lint2/mem2.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/xlint/lint1/mem1.c b/usr.bin/xlint/lint1/mem1.c
index df880b1..f3bf3c6 100644
--- a/usr.bin/xlint/lint1/mem1.c
+++ b/usr.bin/xlint/lint1/mem1.c
@@ -180,7 +180,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 == (void *)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 06d7491..ed97c6f 100644
--- a/usr.bin/xlint/lint2/mem2.c
+++ b/usr.bin/xlint/lint2/mem2.c
@@ -82,7 +82,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 == (void *)MAP_FAILED)
err(1, "can't map memory");
if (ALIGN((u_long)mbuf) != (u_long)mbuf)
errx(1, "mapped address is not aligned");
OpenPOWER on IntegriCloud