summaryrefslogtreecommitdiff
path: root/vm_trace.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-17 07:47:03 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-17 07:47:03 +0000
commit8a664f0c9626b3bf57615021b3a549f5b68534ab (patch)
tree4788ac024dc48a57a6884175b125c670f685d1a7 /vm_trace.c
parent114fc2201c660347b19c13df937bc3f46cc03434 (diff)
don't use `goto`.
* vm_trace.c (rb_exec_event_hooks): we don't need to use goto statement. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_trace.c')
-rw-r--r--vm_trace.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/vm_trace.c b/vm_trace.c
index 352859eea4..c522f5e398 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -358,15 +358,11 @@ rb_exec_event_hooks(rb_trace_arg_t *trace_arg, int pop_p)
ec->local_storage_recursive_hash = ec->local_storage_recursive_hash_for_trace;
ec->errinfo = Qnil;
-
ec->trace_arg = trace_arg;
- {
- state = exec_hooks_protected(ec, vm, &vm->event_hooks, trace_arg);
- if (state) goto terminate;
-
+ state = exec_hooks_protected(ec, vm, &vm->event_hooks, trace_arg);
+ if (!state) {
ec->errinfo = errinfo;
}
- terminate:
ec->trace_arg = NULL;
ec->local_storage_recursive_hash_for_trace = ec->local_storage_recursive_hash;