mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
ext/socket/raddrinfo.c (addrinfo_mark): avoid needless branch
gc.c (gc_mark_children, case T_DATA) does not use the dmark function pointer if DATA_PTR is NULL git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a3c23f0074
commit
f1de2e0070
1 changed files with 2 additions and 4 deletions
|
@ -726,10 +726,8 @@ static void
|
|||
addrinfo_mark(void *ptr)
|
||||
{
|
||||
rb_addrinfo_t *rai = ptr;
|
||||
if (rai) {
|
||||
rb_gc_mark(rai->inspectname);
|
||||
rb_gc_mark(rai->canonname);
|
||||
}
|
||||
rb_gc_mark(rai->inspectname);
|
||||
rb_gc_mark(rai->canonname);
|
||||
}
|
||||
|
||||
#define addrinfo_free RUBY_TYPED_DEFAULT_FREE
|
||||
|
|
Loading…
Reference in a new issue