From 4b56e475483454cd6616dd3c310c251940e9368b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 20 Feb 2010 17:19:52 -0800 Subject: avoid shadow warnings --- ext/posix_mq/posix_mq.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'ext/posix_mq/posix_mq.c') 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; -- cgit v1.2.3-24-ge0c7