summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-07 06:14:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-07 06:14:56 +0000
commitb0cf1c234c142b73d556fe5c66b76a3db8997899 (patch)
treeb3076cc39d99ae5d74162cc18886026721ae4f52 /thread_pthread.c
parent714836c152cf52da40e505157a73ac00f8c3c4f1 (diff)
fix up r62272
* thread.c (timeval_for): tv_usec is suseconds_t which may be smaller than long. * thread_pthread.c (native_cond_timeout): ret is now used in CLOCK_MONOTONIC case only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 08fd19627d..381114d1ce 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -365,13 +365,12 @@ native_cond_timedwait(rb_nativethread_cond_t *cond, pthread_mutex_t *mutex, cons
static struct timespec
native_cond_timeout(rb_nativethread_cond_t *cond, struct timespec timeout_rel)
{
- int ret;
struct timespec timeout;
struct timespec now;
#if USE_MONOTONIC_COND
if (cond->clockid == CLOCK_MONOTONIC) {
- ret = clock_gettime(cond->clockid, &now);
+ int ret = clock_gettime(cond->clockid, &now);
if (ret != 0)
rb_sys_fail("clock_gettime()");
goto out;