summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-15 08:29:22 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-15 08:29:22 +0000
commita0908cb41356f4384a3e9a199c14490a452080ef (patch)
treed39f8594878553632d951423d22bc2542d4ffd06 /proc.c
parent28c42b4c25c48f65cd559018678a5cf34d387c24 (diff)
remove redundant NULL check in mark functions
gc.c (gc_mark_children)only calls mark_func if the T_DATA ptr is non-NULL, so avoid redundantly checking for that in each mark function. * iseq.c (iseq_mark): remove check for data pointer * proc.c (binding_mark): ditto * vm.c (rb_thread_mark): ditto * vm_trace.c (tp_mark): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/proc.c b/proc.c
index f1fd3cea24..1e8c117ff1 100644
--- a/proc.c
+++ b/proc.c
@@ -243,13 +243,13 @@ binding_free(void *ptr)
static void
binding_mark(void *ptr)
{
- rb_binding_t *bind;
+ rb_binding_t *bind = ptr;
+
RUBY_MARK_ENTER("binding");
- if (ptr) {
- bind = ptr;
- RUBY_MARK_UNLESS_NULL(bind->env);
- RUBY_MARK_UNLESS_NULL(bind->path);
- }
+
+ RUBY_MARK_UNLESS_NULL(bind->env);
+ RUBY_MARK_UNLESS_NULL(bind->path);
+
RUBY_MARK_LEAVE("binding");
}