diff options
Diffstat (limited to 'regress/sys/kern/mmap3')
-rw-r--r-- | regress/sys/kern/mmap3/mmaptest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/regress/sys/kern/mmap3/mmaptest.c b/regress/sys/kern/mmap3/mmaptest.c index 1318d46c41f..1e8ee706910 100644 --- a/regress/sys/kern/mmap3/mmaptest.c +++ b/regress/sys/kern/mmap3/mmaptest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mmaptest.c,v 1.6 2006/02/20 17:03:27 mickey Exp $ */ +/* $OpenBSD: mmaptest.c,v 1.7 2014/09/27 06:28:45 doug Exp $ */ /* * Copyright (c) 2002 Marc Espie. * @@ -58,7 +58,7 @@ main(int argc, char *argv[]) if (fd == -1) err(1, "open(test.out) 2"); a2 = mmap(NULL, AREA, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); - if (!a2) + if (a2 == MAP_FAILED) err(1, "mmap"); a2[10] = 3; msync(a2, AREA, MS_SYNC|MS_INVALIDATE); |