1
0
Fork 0
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:
normal 2017-03-09 03:49:47 +00:00
parent a3c23f0074
commit f1de2e0070

View file

@ -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