From f1de2e0070e838a6c9782661b230e0cd0a7ccf15 Mon Sep 17 00:00:00 2001 From: normal Date: Thu, 9 Mar 2017 03:49:47 +0000 Subject: [PATCH] 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 --- ext/socket/raddrinfo.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c index 67bc9c2a97..dcabb2022e 100644 --- a/ext/socket/raddrinfo.c +++ b/ext/socket/raddrinfo.c @@ -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