[or-cvs] [tor/master] Adjust EWMA patch to conform to whitespace style.

Nick Mathewson nickm at seul.org
Sat Dec 19 03:34:45 UTC 2009


Author: Nick Mathewson <nickm at torproject.org>
Date: Thu, 10 Dec 2009 11:15:23 -0500
Subject: Adjust EWMA patch to conform to whitespace style.
Commit: c43fee131d306507937733c7ddc45a040dd2d27c

---
 src/or/connection.c |    1 -
 src/or/relay.c      |   17 ++++++++---------
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/src/or/connection.c b/src/or/connection.c
index bd12e36..409884b 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -2379,7 +2379,6 @@ connection_handle_read(connection_t *conn)
   tor_gettimeofday_cache_clear();
   res = connection_handle_read_impl(conn);
   return res;
-  
 }
 
 /** Pull in new bytes from conn-\>s or conn-\>linked_conn onto conn-\>inbuf,
diff --git a/src/or/relay.c b/src/or/relay.c
index 147412f..9b7396a 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -1938,24 +1938,24 @@ connection_or_flush_from_first_active_circuit(or_connection_t *conn, int max,
 
       /* Update the EWMA cell counter to account for the passage of time. */
       delta_t = (double)(now_hires.tv_sec -
-			    cell_ewma->last_cell_time.tv_sec);
+                         cell_ewma->last_cell_time.tv_sec);
       delta_t += ((double)(now_hires.tv_usec -
-			    cell_ewma->last_cell_time.tv_usec)) / 1000000.0;
+                           cell_ewma->last_cell_time.tv_usec)) / 1000000.0;
 
       if (delta_t > 0.0) {
         cell_ewma->cell_count *=
-	    pow(cell_ewma_significance, delta_t / cell_ewma_interval);
-		//printf("cc: %f ", cell_ewma->cell_count);
+          pow(cell_ewma_significance, delta_t / cell_ewma_interval);
+        //printf("cc: %f ", cell_ewma->cell_count);
       }
       cell_ewma->last_cell_time = now_hires;
 
       /* Now keep track of the lowest cell count we've seen. */
       if (circ_min_cell_count == NULL ||
-	    cell_ewma->cell_count < min_cell_count) {
-		min_cell_count = cell_ewma->cell_count;
-		circ_min_cell_count = circ_iter;
+          cell_ewma->cell_count < min_cell_count) {
+        min_cell_count = cell_ewma->cell_count;
+        circ_min_cell_count = circ_iter;
       }
-      
+
       circ_iter = *next_circ_on_conn_p(circ_iter, conn);
     } while (circ_iter != circ_start);
 
@@ -1971,7 +1971,6 @@ connection_or_flush_from_first_active_circuit(or_connection_t *conn, int max,
       cell_ewma = &(TO_OR_CIRCUIT(circ_min_cell_count)->p_cell_ewma);
     }
   }
-  
 
   if (circ->n_conn == conn) {
     queue = &circ->n_conn_cells;
-- 
1.5.6.5




More information about the tor-commits mailing list