[前][次][番号順一覧][スレッド一覧]

ruby-changes:46525

From: nobu <ko1@a...>
Date: Wed, 10 May 2017 09:39:32 +0900 (JST)
Subject: [ruby-changes:46525] nobu:r58646 (trunk): adjust styles [ci skip]

nobu	2017-05-10 09:39:26 +0900 (Wed, 10 May 2017)

  New Revision: 58646

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58646

  Log:
    adjust styles [ci skip]

  Modified files:
    trunk/id_table.c
    trunk/io.c
    trunk/st.c
    trunk/strftime.c
    trunk/thread_sync.c
Index: io.c
===================================================================
--- io.c	(revision 58645)
+++ io.c	(revision 58646)
@@ -9483,10 +9483,10 @@ do_fcntl(int fd, int cmd, long narg) https://github.com/ruby/ruby/blob/trunk/io.c#L9483
     if (retval != -1) {
 	switch (cmd) {
 #if defined(F_DUPFD)
-	case F_DUPFD:
+	  case F_DUPFD:
 #endif
 #if defined(F_DUPFD_CLOEXEC)
-	case F_DUPFD_CLOEXEC:
+	  case F_DUPFD_CLOEXEC:
 #endif
 	    rb_update_max_fd(retval);
 	}
Index: st.c
===================================================================
--- st.c	(revision 58645)
+++ st.c	(revision 58646)
@@ -1005,10 +1005,12 @@ find_table_bin_ptr_and_reserve(st_table https://github.com/ruby/ruby/blob/trunk/st.c#L1005
                 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, https://github.com/ruby/ruby/blob/trunk/st.c#L1036
         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, https://github.com/ruby/ruby/blob/trunk/st.c#L1060
         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, https://github.com/ruby/ruby/blob/trunk/st.c#L1104
 	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, https://github.com/ruby/ruby/blob/trunk/st.c#L1188
         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 https://github.com/ruby/ruby/blob/trunk/st.c#L1275
 	    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, https://github.com/ruby/ruby/blob/trunk/st.c#L1337
 	        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, https://github.com/ruby/ruby/blob/trunk/st.c#L1393
 	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 (* https://github.com/ruby/ruby/blob/trunk/st.c#L1478
 	    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 (* https://github.com/ruby/ruby/blob/trunk/st.c#L1510
 	        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;
Index: thread_sync.c
===================================================================
--- thread_sync.c	(revision 58645)
+++ thread_sync.c	(revision 58646)
@@ -298,7 +298,8 @@ rb_mutex_unlock_th(rb_mutex_t *mutex, rb https://github.com/ruby/ruby/blob/trunk/thread_sync.c#L298
     }
     else if (mutex->th != th) {
 	err = "Attempt to unlock a mutex which is locked by another thread";
-    } else {
+    }
+    else {
 	struct mutex_waiter *cur = 0, *next = 0;
 	rb_mutex_t *volatile *th_mutex = &th->keeping_mutexes;
 
@@ -306,19 +307,19 @@ rb_mutex_unlock_th(rb_mutex_t *mutex, rb https://github.com/ruby/ruby/blob/trunk/thread_sync.c#L307
 	list_for_each_safe(&mutex->waitq, cur, next, node) {
 	    list_del_init(&cur->node);
 	    switch (cur->th->status) {
-	    case THREAD_RUNNABLE: /* from someone else calling Thread#run */
-	    case THREAD_STOPPED_FOREVER: /* likely (rb_mutex_lock) */
+	      case THREAD_RUNNABLE: /* from someone else calling Thread#run */
+	      case THREAD_STOPPED_FOREVER: /* likely (rb_mutex_lock) */
 		rb_threadptr_interrupt(cur->th);
 		goto found;
-	    case THREAD_STOPPED: /* probably impossible */
+	      case THREAD_STOPPED: /* probably impossible */
 		rb_bug("unexpected THREAD_STOPPED");
-	    case THREAD_KILLED:
+	      case THREAD_KILLED:
                 /* not sure about this, possible in exit GC? */
 		rb_bug("unexpected THREAD_KILLED");
 		continue;
 	    }
 	}
-found:
+      found:
 	while (*th_mutex != mutex) {
 	    th_mutex = &(*th_mutex)->next_mutex;
 	}
Index: id_table.c
===================================================================
--- id_table.c	(revision 58645)
+++ id_table.c	(revision 58646)
@@ -174,7 +174,8 @@ hash_delete_index(struct rb_id_table *tb https://github.com/ruby/ruby/blob/trunk/id_table.c#L174
 	ITEM_SET_KEY(tbl, ix, 0);
 	tbl->items[ix].val = 0;
 	return TRUE;
-    } else {
+    }
+    else {
 	return FALSE;
     }
 }
Index: strftime.c
===================================================================
--- strftime.c	(revision 58645)
+++ strftime.c	(revision 58646)
@@ -543,7 +543,8 @@ rb_strftime_with_timespec(VALUE ftime, c https://github.com/ruby/ruby/blob/trunk/strftime.c#L543
 			if (off < 0) {
 				off = -off;
 				sign = -1;
-			} else {
+			}
+			else {
 				sign = +1;
 			}
                         switch (colons) {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]