From: Ben Gras Date: Wed, 30 May 2012 22:46:47 +0000 (+0200) Subject: mthread: mmap returns MAP_FAILED on error X-Git-Tag: v3.2.1~556 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/mult.png?a=commitdiff_plain;h=c0ef4c4956667225de269f4da31b1b3435da1f22;p=minix.git mthread: mmap returns MAP_FAILED on error --- diff --git a/lib/libmthread/allocate.c b/lib/libmthread/allocate.c index c82143d72..3eb1f0610 100644 --- a/lib/libmthread/allocate.c +++ b/lib/libmthread/allocate.c @@ -406,7 +406,7 @@ void *arg; stackaddr = minix_mmap(NULL, stacksize, PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0); - if (stackaddr == NULL) + if (stackaddr == MAP_FAILED) mthread_panic("Failed to allocate stack to thread"); #if (_MINIX_CHIP == _CHIP_INTEL)