diff options
author | Doug Hogan <doug@cvs.openbsd.org> | 2014-09-27 06:28:46 +0000 |
---|---|---|
committer | Doug Hogan <doug@cvs.openbsd.org> | 2014-09-27 06:28:46 +0000 |
commit | c2c41019dccafa128c9c0b6cd0545526e58461be (patch) | |
tree | 3ca68d0f221226c7fdf3e8c47c1a219052e94c2e /regress/lib | |
parent | 01fe706a518a954b84ed44e18ff408cb4e7525ee (diff) |
Fix mmap() calls that check for a result other than MAP_FAILED.
ok tedu@
Diffstat (limited to 'regress/lib')
-rw-r--r-- | regress/lib/libc/mkstemp/mkstemp_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/regress/lib/libc/mkstemp/mkstemp_test.c b/regress/lib/libc/mkstemp/mkstemp_test.c index ef973b061b6..c1c05eae39d 100644 --- a/regress/lib/libc/mkstemp/mkstemp_test.c +++ b/regress/lib/libc/mkstemp/mkstemp_test.c @@ -122,7 +122,7 @@ main(void) cwd[clen++] = '/'; cwd[clen] = '\0'; p = mmap(NULL, pg * 3, PROT_READ | PROT_WRITE, MAP_ANON, -1, 0); - if (p == NULL) + if (p == MAP_FAILED) err(1, "mmap"); if (mprotect(p, pg, PROT_NONE) || mprotect(p + pg * 2, pg, PROT_NONE)) err(1, "mprotect"); |