From 105da34ea1b498069d096e8d3045e4eff83b9804 Mon Sep 17 00:00:00 2001 From: Knut Franke Date: Tue, 7 Oct 2014 20:31:59 +0200 Subject: [PATCH 3/5] Small code cleanup Remove variable that is used only once, several lines after initialization. --- cont.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cont.c b/cont.c index 49b7702..ab17dcc 100644 --- a/cont.c +++ b/cont.c @@ -450,14 +450,13 @@ static VALUE cont_capture(volatile int *stat) { rb_context_t *cont; - rb_thread_t *th = GET_THREAD(), *sth; + rb_thread_t *th = GET_THREAD(); volatile VALUE contval; THREAD_MUST_BE_RUNNING(th); rb_vm_stack_to_heap(th); cont = cont_new(rb_cContinuation); contval = cont->self; - sth = &cont->saved_thread; #ifdef CAPTURE_JUST_VALID_VM_STACK cont->vm_stack_slen = th->cfp->sp + th->mark_stack_len - th->stack; @@ -469,7 +468,7 @@ cont_capture(volatile int *stat) cont->vm_stack = ALLOC_N(VALUE, th->stack_size); MEMCPY(cont->vm_stack, th->stack, VALUE, th->stack_size); #endif - sth->stack = 0; + cont->saved_thread.stack = 0; cont_save_machine_stack(th, cont); -- 1.9.1