summaryrefslogtreecommitdiffstats
path: root/usr.bin/xlint/lint2/mem2.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/xlint/lint2/mem2.c')
-rw-r--r--usr.bin/xlint/lint2/mem2.c2
1 files changed, 1 insertions, 1 deletions
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