summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-10 00:39:26 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-10 00:39:26 (GMT)
commit6924066a65f923a61f31bdc910b57ca9606715b0 (patch)
treefe239dabe2f974c8af113bdcc2ca36ffd93d37f8 /st.c
parent7573452099e010ccf5ac26cb56e0172046671f91 (diff)
adjust styles [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'st.c')
-rw-r--r--st.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/st.c b/st.c
index a8c9a44..c2848b6 100644
--- a/st.c
+++ b/st.c
@@ -1005,10 +1005,12 @@ find_table_bin_ptr_and_reserve(st_table *tab, st_hash_t *hash_value,
MARK_BIN_EMPTY(tab, ind);
}
break;
- } else if (! DELETED_BIN_P(entry_index)) {
+ }
+ else if (! DELETED_BIN_P(entry_index)) {
if (PTR_EQUAL(tab, &entries[entry_index - ENTRY_BASE], curr_hash_value, key))
break;
- } else if (first_deleted_bin_ind == UNDEFINED_BIN_IND)
+ }
+ else if (first_deleted_bin_ind == UNDEFINED_BIN_IND)
first_deleted_bin_ind = ind;
#ifdef QUADRATIC_PROBE
ind = hash_bin(ind + d, tab);
@@ -1034,7 +1036,8 @@ st_lookup(st_table *tab, st_data_t key, st_data_t *value)
bin = find_entry(tab, hash, key);
if (bin == UNDEFINED_ENTRY_IND)
return 0;
- } else {
+ }
+ else {
bin = find_table_entry_ind(tab, hash, key);
if (bin == UNDEFINED_ENTRY_IND)
return 0;
@@ -1057,7 +1060,8 @@ st_get_key(st_table *tab, st_data_t key, st_data_t *result)
bin = find_entry(tab, hash, key);
if (bin == UNDEFINED_ENTRY_IND)
return 0;
- } else {
+ }
+ else {
bin = find_table_entry_ind(tab, hash, key);
if (bin == UNDEFINED_ENTRY_IND)
return 0;
@@ -1100,7 +1104,8 @@ st_insert(st_table *tab, st_data_t key, st_data_t value)
if (new_p)
tab->num_entries++;
bin_ind = UNDEFINED_BIN_IND;
- } else {
+ }
+ else {
bin = find_table_bin_ptr_and_reserve(tab, &hash_value,
key, &bin_ind);
new_p = bin == UNDEFINED_ENTRY_IND;
@@ -1183,7 +1188,8 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value,
bin = find_entry(tab, hash_value, key);
new_p = bin == UNDEFINED_ENTRY_IND;
bin_ind = UNDEFINED_BIN_IND;
- } else {
+ }
+ else {
bin = find_table_bin_ptr_and_reserve(tab, &hash_value,
key, &bin_ind);
new_p = bin == UNDEFINED_ENTRY_IND;
@@ -1269,7 +1275,8 @@ st_general_delete(st_table *tab, st_data_t *key, st_data_t *value)
if (value != 0) *value = 0;
return 0;
}
- } else {
+ }
+ else {
bin_ind = find_table_bin_ind(tab, hash, *key);
if (bin_ind == UNDEFINED_BIN_IND) {
if (value != 0) *value = 0;
@@ -1330,7 +1337,8 @@ st_shift(st_table *tab, st_data_t *key, st_data_t *value)
bin = find_entry(tab, curr_entry_ptr->hash, curr_entry_ptr->key);
st_assert(bin != UNDEFINED_ENTRY_IND
&& &entries[bin] == curr_entry_ptr);
- } else {
+ }
+ else {
bin_ind = find_table_bin_ind(tab, curr_entry_ptr->hash,
curr_entry_ptr->key);
st_assert(bin_ind != UNDEFINED_BIN_IND
@@ -1385,7 +1393,8 @@ st_update(st_table *tab, st_data_t key,
existing = bin != UNDEFINED_ENTRY_IND;
entry = &entries[bin];
bin_ind = UNDEFINED_BIN_IND;
- } else {
+ }
+ else {
bin_ind = find_table_bin_ind(tab, hash, key);
existing = bin_ind != UNDEFINED_BIN_IND;
if (existing) {
@@ -1469,7 +1478,8 @@ st_general_foreach(st_table *tab, int (*func)(ANYARGS), st_data_t arg,
if (packed_p) {
i = find_entry(tab, hash, key);
error_p = i == UNDEFINED_ENTRY_IND;
- } else {
+ }
+ else {
i = find_table_entry_ind(tab, hash, key);
error_p = i == UNDEFINED_ENTRY_IND;
i -= ENTRY_BASE;
@@ -1500,7 +1510,8 @@ st_general_foreach(st_table *tab, int (*func)(ANYARGS), st_data_t arg,
bin = find_entry(tab, hash, curr_entry_ptr->key);
if (bin == UNDEFINED_ENTRY_IND)
break;
- } else {
+ }
+ else {
bin_ind = find_table_bin_ind(tab, hash, curr_entry_ptr->key);
if (bin_ind == UNDEFINED_BIN_IND)
break;