From b7aa49b9a7dfe7572fab456ab4f5cde1377713b0 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 28 Aug 2013 08:20:10 +0000 Subject: [PATCH] thread_pthread.c: dup code * thread_pthread.c (get_stack): merge duplicated code split by ifdef. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread_pthread.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/thread_pthread.c b/thread_pthread.c index 8fb510e0e4..d915c10943 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -532,12 +532,11 @@ get_stack(void **addr, size_t *size) CHECK_ERR(pthread_attr_get_np(pthread_self(), &attr)); # ifdef HAVE_PTHREAD_ATTR_GETSTACK CHECK_ERR(pthread_attr_getstack(&attr, addr, size)); - STACK_DIR_UPPER((void)0, (void)(*addr = (char *)*addr + *size)); # else CHECK_ERR(pthread_attr_getstackaddr(&attr, addr)); CHECK_ERR(pthread_attr_getstacksize(&attr, size)); - STACK_DIR_UPPER((void)0, (void)(*addr = (char *)*addr + *size)); # endif + STACK_DIR_UPPER((void)0, (void)(*addr = (char *)*addr + *size)); pthread_attr_destroy(&attr); #elif (defined HAVE_PTHREAD_GET_STACKADDR_NP && defined HAVE_PTHREAD_GET_STACKSIZE_NP) /* MacOS X */ pthread_t th = pthread_self();