Fix styles [ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2019-01-09 13:58:49 +00:00
parent df0faba1ff
commit 78d6e33702
8 changed files with 21 additions and 16 deletions

View File

@ -188,7 +188,8 @@ ary_verify_(VALUE ary, const char *file, int line)
} }
void void
rb_ary_verify(VALUE ary){ rb_ary_verify(VALUE ary)
{
ary_verify(ary); ary_verify(ary);
} }
#else #else
@ -4531,7 +4532,7 @@ rb_ary_difference_multi(int argc, VALUE *argv, VALUE ary)
for (i = 0; i < RARRAY_LEN(ary); i++) { for (i = 0; i < RARRAY_LEN(ary); i++) {
int j; int j;
VALUE elt = rb_ary_elt(ary, i); VALUE elt = rb_ary_elt(ary, i);
for (j = 0; j < argc; j++){ for (j = 0; j < argc; j++) {
if (is_hash[j]) { if (is_hash[j]) {
if (rb_hash_stlike_lookup(argv[j], RARRAY_AREF(ary, i), NULL)) if (rb_hash_stlike_lookup(argv[j], RARRAY_AREF(ary, i), NULL))
break; break;
@ -4691,7 +4692,7 @@ rb_ary_union_multi(int argc, VALUE *argv, VALUE ary)
VALUE hash, ary_union; VALUE hash, ary_union;
sum = RARRAY_LEN(ary); sum = RARRAY_LEN(ary);
for (i = 0; i < argc; i++){ for (i = 0; i < argc; i++) {
argv[i] = to_ary(argv[i]); argv[i] = to_ary(argv[i]);
sum += RARRAY_LEN(argv[i]); sum += RARRAY_LEN(argv[i]);
} }

View File

@ -3895,11 +3895,7 @@ static_literal_node_p(const NODE *node, const rb_iseq_t *iseq)
case NODE_FALSE: case NODE_FALSE:
return TRUE; return TRUE;
case NODE_STR: case NODE_STR:
if (ISEQ_COMPILE_DATA(iseq)->option->frozen_string_literal) { return ISEQ_COMPILE_DATA(iseq)->option->frozen_string_literal;
return TRUE;
} else {
return FALSE;
}
default: default:
return FALSE; return FALSE;
} }

6
cont.c
View File

@ -875,11 +875,13 @@ fiber_machine_stack_alloc(size_t size)
machine_stack_cache_index--; machine_stack_cache_index--;
machine_stack_cache[machine_stack_cache_index].ptr = NULL; machine_stack_cache[machine_stack_cache_index].ptr = NULL;
machine_stack_cache[machine_stack_cache_index].size = 0; machine_stack_cache[machine_stack_cache_index].size = 0;
} else { }
else {
/* TODO handle multiple machine stack size */ /* TODO handle multiple machine stack size */
rb_bug("machine_stack_cache size is not canonicalized"); rb_bug("machine_stack_cache size is not canonicalized");
} }
} else { }
else {
#ifdef _WIN32 #ifdef _WIN32
ptr = VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE); ptr = VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE);

3
dir.c
View File

@ -2061,7 +2061,8 @@ join_path_from_pattern(struct glob_pattern **beg)
path = GLOB_ALLOC_N(char, path_len + 1); path = GLOB_ALLOC_N(char, path_len + 1);
memcpy(path, str, path_len); memcpy(path, str, path_len);
path[path_len] = '\0'; path[path_len] = '\0';
} else { }
else {
size_t len = strlen(str); size_t len = strlen(str);
char *tmp; char *tmp;
tmp = GLOB_REALLOC(path, path_len + len + 2); tmp = GLOB_REALLOC(path, path_len + len + 2);

3
iseq.c
View File

@ -191,7 +191,8 @@ rb_iseq_each_value(const rb_iseq_t *iseq, iseq_value_itr_t * func, void *data)
#if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE #if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE
if (FL_TEST(iseq, ISEQ_TRANSLATED)) { if (FL_TEST(iseq, ISEQ_TRANSLATED)) {
translator = rb_vm_insn_addr2insn2; translator = rb_vm_insn_addr2insn2;
} else { }
else {
translator = rb_vm_insn_null_translator; translator = rb_vm_insn_null_translator;
} }
#else #else

View File

@ -619,7 +619,8 @@ exec_process(const char *path, char *const argv[])
if (WIFEXITED(stat)) { if (WIFEXITED(stat)) {
exit_code = WEXITSTATUS(stat); exit_code = WEXITSTATUS(stat);
break; break;
} else if (WIFSIGNALED(stat)) { }
else if (WIFSIGNALED(stat)) {
exit_code = -1; exit_code = -1;
break; break;
} }

View File

@ -1472,9 +1472,11 @@ r_cover_range_p(VALUE range, VALUE beg, VALUE end, VALUE val)
if (EXCL(range) == EXCL(val)) { if (EXCL(range) == EXCL(val)) {
return cmp_end >= 0; return cmp_end >= 0;
} else if (EXCL(range)) { }
else if (EXCL(range)) {
return cmp_end > 0; return cmp_end > 0;
} else if (cmp_end >= 0) { }
else if (cmp_end >= 0) {
return TRUE; return TRUE;
} }

View File

@ -1296,7 +1296,8 @@ check_definition_visibility(VALUE mod, int argc, VALUE *argv)
if (argc == 1) { if (argc == 1) {
inc_super = 1; inc_super = 1;
} else { }
else {
inc_super = RTEST(include_super); inc_super = RTEST(include_super);
if (!inc_super) { if (!inc_super) {
lookup_mod = RCLASS_ORIGIN(mod); lookup_mod = RCLASS_ORIGIN(mod);