mthread: mmap returns MAP_FAILED on error

This commit is contained in:
Ben Gras 2012-05-31 00:46:47 +02:00
parent 73379f0be5
commit c0ef4c4956

View file

@ -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)