From cad4591086b285fa5c8fb61f19692b9a521dcea7 Mon Sep 17 00:00:00 2001 From: normal Date: Fri, 17 Mar 2017 19:59:56 +0000 Subject: remove branches in dmark and dfree GC callbacks dmark and dfree callbacks are never called in gc.c for NULL DATA_PTR values, not even for zombie objects. * compile.c (ibf_loader_mark): remove branch for pointer validity * compile.c (ibf_loader_free): ditto * cont.c (cont_free): ditto * cont.c (fiber_free): ditto * dir.c (dir_free): ditto * ext/stringio/stringio.c (strio_mark): ditto * proc.c (binding_free): ditto * thread_sync.c (mutex_free): ditto * vm.c (thread_free): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/stringio/stringio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ext/stringio/stringio.c') diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index fb2eddaa7e..ba6512366a 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -52,9 +52,8 @@ static void strio_mark(void *p) { struct StringIO *ptr = p; - if (ptr) { - rb_gc_mark(ptr->string); - } + + rb_gc_mark(ptr->string); } static void -- cgit v1.2.3