diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-12 17:16:21 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-12 17:16:21 +0000 |
commit | 836a8cf2149f214d86e31f07884530ed10d86653 (patch) | |
tree | 850f95498d619a725bce435e8f84ba0313e5a63d /io.c | |
parent | 9fac3321a7207552f2717bed4193a8c3bdd31234 (diff) |
* io.c (select_internal): remove unused variable (interrupt_flag).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 67 |
1 files changed, 32 insertions, 35 deletions
@@ -7236,7 +7236,6 @@ select_internal(VALUE read, VALUE write, VALUE except, struct timeval *tp, rb_fd rb_io_t *fptr; long i; int max = 0, n; - int interrupt_flag = 0; int pending = 0; struct timeval timerec; @@ -7306,49 +7305,47 @@ select_internal(VALUE read, VALUE write, VALUE except, struct timeval *tp, rb_fd rb_ary_push(res, wp?rb_ary_new():rb_ary_new2(0)); rb_ary_push(res, ep?rb_ary_new():rb_ary_new2(0)); - if (interrupt_flag == 0) { - if (rp) { - list = RARRAY_PTR(res)[0]; - for (i=0; i< RARRAY_LEN(read); i++) { - VALUE obj = rb_ary_entry(read, i); - VALUE io = rb_io_get_io(obj); - GetOpenFile(io, fptr); - if (rb_fd_isset(fptr->fd, &fds[0]) || - rb_fd_isset(fptr->fd, &fds[3])) { - rb_ary_push(list, obj); - } + if (rp) { + list = RARRAY_PTR(res)[0]; + for (i=0; i< RARRAY_LEN(read); i++) { + VALUE obj = rb_ary_entry(read, i); + VALUE io = rb_io_get_io(obj); + GetOpenFile(io, fptr); + if (rb_fd_isset(fptr->fd, &fds[0]) || + rb_fd_isset(fptr->fd, &fds[3])) { + rb_ary_push(list, obj); } } + } - if (wp) { - list = RARRAY_PTR(res)[1]; - for (i=0; i< RARRAY_LEN(write); i++) { - VALUE obj = rb_ary_entry(write, i); - VALUE io = rb_io_get_io(obj); - VALUE write_io = GetWriteIO(io); - GetOpenFile(write_io, fptr); - if (rb_fd_isset(fptr->fd, &fds[1])) { - rb_ary_push(list, obj); - } + if (wp) { + list = RARRAY_PTR(res)[1]; + for (i=0; i< RARRAY_LEN(write); i++) { + VALUE obj = rb_ary_entry(write, i); + VALUE io = rb_io_get_io(obj); + VALUE write_io = GetWriteIO(io); + GetOpenFile(write_io, fptr); + if (rb_fd_isset(fptr->fd, &fds[1])) { + rb_ary_push(list, obj); } } + } - if (ep) { - list = RARRAY_PTR(res)[2]; - for (i=0; i< RARRAY_LEN(except); i++) { - VALUE obj = rb_ary_entry(except, i); - VALUE io = rb_io_get_io(obj); - VALUE write_io = GetWriteIO(io); - GetOpenFile(io, fptr); + if (ep) { + list = RARRAY_PTR(res)[2]; + for (i=0; i< RARRAY_LEN(except); i++) { + VALUE obj = rb_ary_entry(except, i); + VALUE io = rb_io_get_io(obj); + VALUE write_io = GetWriteIO(io); + GetOpenFile(io, fptr); + if (rb_fd_isset(fptr->fd, &fds[2])) { + rb_ary_push(list, obj); + } + else if (io != write_io) { + GetOpenFile(write_io, fptr); if (rb_fd_isset(fptr->fd, &fds[2])) { rb_ary_push(list, obj); } - else if (io != write_io) { - GetOpenFile(write_io, fptr); - if (rb_fd_isset(fptr->fd, &fds[2])) { - rb_ary_push(list, obj); - } - } } } } |