From d2a0d3a14dc5e4f2e4abfc42296e98d11597d04c Mon Sep 17 00:00:00 2001 From: normal Date: Mon, 22 May 2017 23:41:50 +0000 Subject: variable.c (autoload_sleep_done): avoid needless list_node init We do not need list_del_init in ensure callbacks, only list_del, since it can only ever be called after list_del_init in autoload_reset. So avoid the needless re-initialization. * variable.c (autoload_sleep_done): s/list_del_init/list_del/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- variable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'variable.c') diff --git a/variable.c b/variable.c index 63c5f2aeab..10b885070c 100644 --- a/variable.c +++ b/variable.c @@ -2141,7 +2141,7 @@ autoload_sleep_done(VALUE arg) struct autoload_state *state = (struct autoload_state *)arg; if (state->thread != Qfalse && rb_thread_to_be_killed(state->thread)) { - list_del_init(&state->waitq.node); /* idempotent */ + list_del(&state->waitq.node); /* idempotent after list_del_init */ } return Qfalse; -- cgit v1.2.3