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/misc/X11/blt/blt.c | |
parent | 01fe706a518a954b84ed44e18ff408cb4e7525ee (diff) |
Fix mmap() calls that check for a result other than MAP_FAILED.
ok tedu@
Diffstat (limited to 'regress/misc/X11/blt/blt.c')
-rw-r--r-- | regress/misc/X11/blt/blt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/regress/misc/X11/blt/blt.c b/regress/misc/X11/blt/blt.c index 7d8df9edd25..18e6a360c5d 100644 --- a/regress/misc/X11/blt/blt.c +++ b/regress/misc/X11/blt/blt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: blt.c,v 1.2 2013/10/28 08:47:43 jsg Exp $ */ +/* $OpenBSD: blt.c,v 1.3 2014/09/27 06:28:45 doug Exp $ */ /* * Written by Mark Kettenis <kettenis@openbsd.org> 2004 Public Domain */ @@ -34,10 +34,10 @@ main (void) pagesize = getpagesize(); src = mmap(NULL, 2 * pagesize, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0); - assert(src); + assert(src != MAP_FAILED); dst = mmap(NULL, 2 * pagesize, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0); - assert(dst); + assert(dst != MAP_FAILED); mprotect((char *)src + pagesize, pagesize, PROT_NONE); src = (FbBits *)((char *)src + (pagesize - sizeof map)); |