summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-19 20:40:49 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-19 20:40:49 +0900
commitab6d8d0b65d42cb872707b330d6172beb8579e8b (patch)
treeba40bf63312306c21fa1a7fe78639389540bf68a
parent659eda7f83a1c27e887f96c2e1bee687d363a187 (diff)
Adjust indent
-rw-r--r--cont.c2
-rw-r--r--gc.c12
-rw-r--r--vm.c9
3 files changed, 13 insertions, 10 deletions
diff --git a/cont.c b/cont.c
index 8337ddce99..0c8a68fe9a 100644
--- a/cont.c
+++ b/cont.c
@@ -1578,7 +1578,7 @@ rb_threadptr_root_fiber_release(rb_thread_t *th)
VM_ASSERT(th->ec->fiber_ptr->cont.type == FIBER_CONTEXT);
VM_ASSERT(th->ec->fiber_ptr->cont.self == 0);
- // th->ec->fiber_ptr->cont.saved_ec.vm_stack = NULL;
+ // th->ec->fiber_ptr->cont.saved_ec.vm_stack = NULL;
fiber_free(th->ec->fiber_ptr);
if (th->ec == ruby_current_execution_context_ptr) {
diff --git a/gc.c b/gc.c
index de682e0dda..7b82a889f7 100644
--- a/gc.c
+++ b/gc.c
@@ -2341,7 +2341,8 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
if (st_delete(objspace->obj_to_id_tbl, (st_data_t *)&obj, &id)) {
assert(id);
st_delete(objspace->id_to_obj_tbl, (st_data_t *)&id, NULL);
- } else {
+ }
+ else {
rb_bug("Object ID see, but not in mapping table: %s\n", obj_info(obj));
}
}
@@ -4553,7 +4554,8 @@ mark_hash(rb_objspace_t *objspace, VALUE hash)
{
if (rb_hash_compare_by_id_p(hash)) {
rb_hash_stlike_foreach(hash, pin_key_mark_value, (st_data_t)objspace);
- } else {
+ }
+ else {
rb_hash_stlike_foreach(hash, mark_keyvalue, (st_data_t)objspace);
}
@@ -9378,9 +9380,9 @@ rb_memerror(void)
VALUE exc;
if (0) {
- // Print out pid, sleep, so you can attach debugger to see what went wrong:
- fprintf(stderr, "rb_memerror pid=%d\n", getpid());
- sleep(60);
+ // Print out pid, sleep, so you can attach debugger to see what went wrong:
+ fprintf(stderr, "rb_memerror pid=%d\n", getpid());
+ sleep(60);
}
if (during_gc) gc_exit(objspace, "rb_memerror");
diff --git a/vm.c b/vm.c
index 16a7312ce3..258c1b5942 100644
--- a/vm.c
+++ b/vm.c
@@ -2710,10 +2710,11 @@ th_init(rb_thread_t *th, VALUE self)
if (self == 0) {
size_t size = th->vm->default_params.thread_vm_stack_size / sizeof(VALUE);
rb_ec_initialize_vm_stack(th->ec, ALLOC_N(VALUE, size), size);
- } else {
- VM_ASSERT(th->ec->cfp == NULL);
- VM_ASSERT(th->ec->vm_stack == NULL);
- VM_ASSERT(th->ec->vm_stack_size == 0);
+ }
+ else {
+ VM_ASSERT(th->ec->cfp == NULL);
+ VM_ASSERT(th->ec->vm_stack == NULL);
+ VM_ASSERT(th->ec->vm_stack_size == 0);
}
th->status = THREAD_RUNNABLE;