about summary refs log tree commit homepage
path: root/ext/posix_mq/posix_mq.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-02-20 17:19:52 -0800
committerEric Wong <normalperson@yhbt.net>2010-02-20 17:19:52 -0800
commit4b56e475483454cd6616dd3c310c251940e9368b (patch)
tree037a1034e495e91489a8e72c7c5f3dc6caf0653e /ext/posix_mq/posix_mq.c
parent97ef1cfd699640e40d2d63746d005f4f4cf6a863 (diff)
downloadruby_posix_mq-4b56e475483454cd6616dd3c310c251940e9368b.tar.gz
Diffstat (limited to 'ext/posix_mq/posix_mq.c')
-rw-r--r--ext/posix_mq/posix_mq.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/posix_mq/posix_mq.c b/ext/posix_mq/posix_mq.c
index e1ad5f1..82bb826 100644
--- a/ext/posix_mq/posix_mq.c
+++ b/ext/posix_mq/posix_mq.c
@@ -127,14 +127,14 @@ struct rw_args {
 /* hope it's there..., TODO: a better version that works in rbx */
 struct timeval rb_time_interval(VALUE);
 
-static struct timespec *convert_timeout(struct timespec *dest, VALUE time)
+static struct timespec *convert_timeout(struct timespec *dest, VALUE t)
 {
         struct timeval tv, now;
 
-        if (NIL_P(time))
+        if (NIL_P(t))
                 return NULL;
 
-        tv = rb_time_interval(time); /* aggregate return :( */
+        tv = rb_time_interval(t); /* aggregate return :( */
         gettimeofday(&now, NULL);
         dest->tv_sec = now.tv_sec + tv.tv_sec;
         dest->tv_nsec = (now.tv_usec + tv.tv_usec) * 1000;
@@ -727,8 +727,7 @@ static void thread_notify_fd(union sigval sv)
 
 static void setup_notify_io(struct sigevent *not, VALUE io)
 {
-        VALUE fileno = rb_funcall(io, id_fileno, 0, 0);
-        int fd = NUM2INT(fileno);
+        int fd = NUM2INT(rb_funcall(io, id_fileno, 0, 0));
         pthread_attr_t attr;
         int e;