summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-20 21:34:44 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-20 21:34:44 +0000
commit39c64117f6323ffa16bdcd14a2c907daa31c49c9 (patch)
tree2e1b05d23f1a4eaa3f6fd18a2e31b83173ce2958 /thread.c
parent17e4aff277a350fa6afea31bc521c9a3f4f47353 (diff)
thread*.c: avoid unnecessary initialization for list_for_each_safe
According to r52446, it is only necessary for the current item (@i), not the `@nxt` parameter for list_for_each_safe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/thread.c b/thread.c
index 51710d2..6065593 100644
--- a/thread.c
+++ b/thread.c
@@ -2332,8 +2332,7 @@ int
rb_notify_fd_close(int fd, struct list_head *busy)
{
rb_vm_t *vm = GET_THREAD()->vm;
- struct waiting_fd *wfd = 0;
- struct waiting_fd *next = 0;
+ struct waiting_fd *wfd = 0, *next;
list_for_each_safe(&vm->waiting_fds, wfd, next, wfd_node) {
if (wfd->fd == fd) {