ruby-changes:45748
From: normal <ko1@a...>
Date: Thu, 9 Mar 2017 12:49:51 +0900 (JST)
Subject: [ruby-changes:45748] normal:r57821 (trunk): ext/socket/raddrinfo.c (addrinfo_mark): avoid needless branch
normal 2017-03-09 12:49:47 +0900 (Thu, 09 Mar 2017) New Revision: 57821 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57821 Log: 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 Modified files: trunk/ext/socket/raddrinfo.c Index: ext/socket/raddrinfo.c =================================================================== --- ext/socket/raddrinfo.c (revision 57820) +++ ext/socket/raddrinfo.c (revision 57821) @@ -726,10 +726,8 @@ static void https://github.com/ruby/ruby/blob/trunk/ext/socket/raddrinfo.c#L726 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/