rb_szqueue_push: do not goto into a branch

I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea.  Better refactor.
This commit is contained in:
卜部昌平 2020-06-19 10:56:25 +09:00
Родитель 8fc8912109
Коммит f402dc3557
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -1156,7 +1156,7 @@ rb_szqueue_push(int argc, VALUE *argv, VALUE self)
rb_raise(rb_eThreadError, "queue full");
}
else if (queue_closed_p(self)) {
goto closed;
break;
}
else {
struct queue_waiter qw;
@ -1172,7 +1172,6 @@ rb_szqueue_push(int argc, VALUE *argv, VALUE self)
}
if (queue_closed_p(self)) {
closed:
raise_closed_queue_error(self);
}