diff options
author | Nobuyoshi Nakada <[email protected]> | 2021-07-21 12:24:22 +0900 |
---|---|---|
committer | Koichi Sasada <[email protected]> | 2021-12-15 15:04:34 +0900 |
commit | 88e36d8f3c75a9b57d68e930385a23ff54b05cf3 (patch) | |
tree | c178554fc941f4063c203a966515ab0b42170a63 /hash.c | |
parent | 9bb83a82aba3cf844fd96782f747eefb1876439b (diff) |
Adjust styles [ci skip]
* --braces-after-func-def-line
* --space-after-for
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5263
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 27 |
1 files changed, 10 insertions, 17 deletions
@@ -5381,11 +5381,11 @@ env_entry_count() } static void -copy_env_pairs(VALUE arr[], int size) { +copy_env_pairs(VALUE arr[], int size) +{ char **env; env = GET_ENVIRON(environ); - for(int i = 0; i < size; i++) - { + for (int i = 0; i < size; i++) { const char *p = *env; arr[i] = p; env++; @@ -5406,8 +5406,7 @@ env_keys(int raw) copy_env_pairs(env_pairs, pair_count); rb_native_mutex_unlock(&env_lock); - for(int current_pair = 0; current_pair < pair_count; current_pair++) - { + for (int current_pair = 0; current_pair < pair_count; current_pair++) { const char *p = env_pairs[current_pair]; char *s = strchr(p, '='); if (s) { @@ -5500,8 +5499,7 @@ env_values(void) copy_env_pairs(env_pairs, pair_count); rb_native_mutex_unlock(&env_lock); - for(int current_pair = 0; current_pair < pair_count; current_pair++) - { + for (int current_pair = 0; current_pair < pair_count; current_pair++) { const char *p = env_pairs[current_pair]; char *s = strchr(p, '='); if (s) { @@ -5594,8 +5592,7 @@ env_each_pair(VALUE ehash) copy_env_pairs(env_pairs, pair_count); rb_native_mutex_unlock(&env_lock); - for(int current_pair = 0; current_pair < pair_count; current_pair++) - { + for (int current_pair = 0; current_pair < pair_count; current_pair++) { const char *p = env_pairs[current_pair]; char *s = strchr(p, '='); if (s) { @@ -5952,8 +5949,7 @@ env_inspect(VALUE _) copy_env_pairs(env_pairs, pair_count); rb_native_mutex_unlock(&env_lock); - for(int current_pair = 0; current_pair < pair_count; current_pair++) - { + for (int current_pair = 0; current_pair < pair_count; current_pair++) { const char *p = env_pairs[current_pair]; char *s = strchr(p, '='); @@ -5995,8 +5991,7 @@ env_to_a(VALUE _) copy_env_pairs(env_pairs, pair_count); rb_native_mutex_unlock(&env_lock); - for(int current_pair = 0; current_pair < pair_count; current_pair++) - { + for (int current_pair = 0; current_pair < pair_count; current_pair++) { const char *p = env_pairs[current_pair]; char *s = strchr(p, '='); if (s) { @@ -6241,8 +6236,7 @@ env_key(VALUE dmy, VALUE value) copy_env_pairs(env_pairs, pair_count); rb_native_mutex_unlock(&env_lock); - for(int current_pair = 0; current_pair < pair_count; current_pair++) - { + for (int current_pair = 0; current_pair < pair_count; current_pair++) { const char *p = env_pairs[current_pair]; char *s = strchr(p, '='); if (s++) { @@ -6270,8 +6264,7 @@ env_to_hash(void) copy_env_pairs(env_pairs, pair_count); rb_native_mutex_unlock(&env_lock); - for(int current_pair = 0; current_pair < pair_count; current_pair++) - { + for (int current_pair = 0; current_pair < pair_count; current_pair++) { const char *p = env_pairs[current_pair]; char *s = strchr(p, '='); if (s) { |