mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
thread_sync.c (rb_mutex_abandon_keeping_mutexes): remove unnecessary check
rb_mutex_abandon_all functions fine when passed a NULL value, so let the compiler deal with the complexity of the branch instead of the person reading the code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
010a742cb6
commit
2a742d5f9b
1 changed files with 1 additions and 3 deletions
|
@ -407,9 +407,7 @@ rb_mutex_unlock(VALUE self)
|
|||
static void
|
||||
rb_mutex_abandon_keeping_mutexes(rb_thread_t *th)
|
||||
{
|
||||
if (th->keeping_mutexes) {
|
||||
rb_mutex_abandon_all(th->keeping_mutexes);
|
||||
}
|
||||
rb_mutex_abandon_all(th->keeping_mutexes);
|
||||
th->keeping_mutexes = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue