summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--thread_pthread.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 012fed8562..55ed1c047d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Jun 11 06:20:50 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * thread_pthread.c (rb_thread_create_timer_thread): assign return
+ value to the variable err.
+
Mon Jun 11 06:17:06 2012 NARUSE, Yui <naruse@ruby-lang.org>
* thread_pthread.c (native_cond_initialize): fix typo in r36022.
diff --git a/thread_pthread.c b/thread_pthread.c
index 332e97be21..f9fa97bf8c 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -1274,7 +1274,8 @@ rb_thread_create_timer_thread(void)
#ifdef HAVE_PTHREAD_ATTR_INIT
pthread_attr_t attr;
- if (pthread_attr_init(&attr)) {
+ err = pthread_attr_init(&attr);
+ if (err != 0) {
fprintf(stderr, "[FATAL] Failed to initialize pthread attr(errno: %d)\n", err);
exit(EXIT_FAILURE);
}