From edb09b0c7fe5cfb64cf9fbdff972073411292488 Mon Sep 17 00:00:00 2001 From: davidxu Date: Sat, 28 Jun 2003 09:48:05 +0000 Subject: Use mmap retuned value. Reviewed by: deischen --- lib/libpthread/thread/thr_stack.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/libpthread/thread/thr_stack.c') diff --git a/lib/libpthread/thread/thr_stack.c b/lib/libpthread/thread/thr_stack.c index f14289e..530e2b9 100644 --- a/lib/libpthread/thread/thr_stack.c +++ b/lib/libpthread/thread/thr_stack.c @@ -200,8 +200,9 @@ _thr_stack_alloc(struct pthread_attr *attr) _kse_critical_leave(crit); /* Map the stack, but not the guard page: */ - if (mmap(attr->stackaddr_attr, stacksize, - PROT_READ | PROT_WRITE, MAP_STACK, -1, 0) == MAP_FAILED) + if ((attr->stackaddr_attr = mmap(attr->stackaddr_attr, + stacksize, PROT_READ | PROT_WRITE, MAP_STACK, + -1, 0)) == MAP_FAILED) attr->stackaddr_attr = NULL; } if (attr->stackaddr_attr != NULL) -- cgit v1.1