]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
clean up comments and whitespace a bit
authorRoger Dingledine <arma@torproject.org>
Thu, 19 Feb 2015 00:27:02 +0000 (19:27 -0500)
committerRoger Dingledine <arma@torproject.org>
Thu, 19 Feb 2015 00:27:02 +0000 (19:27 -0500)
src/or/dirvote.c
src/or/entrynodes.h
src/or/routerparse.c
src/test/test_guardfraction.c

index f5694bab62cf424241f5e9212dcb952f2d49741d..7a5154dae515b9a247f9bfe436a053dd5b7cded9 100644 (file)
@@ -1060,7 +1060,8 @@ update_total_bandwidth_weights(const routerstatus_t *rs,
    *    E' = E + (1-F)*B, if N has the exit flag
    *
    * In this block of code, we prepare the bandwidth values by setting
-   * the default_bandwidth to F*B and guardfraction_bandwidth to (1-F)*B. */
+   * the default_bandwidth to F*B and guardfraction_bandwidth to (1-F)*B.
+   */
   if (rs->has_guardfraction) {
     guardfraction_bandwidth_t guardfraction_bw;
 
@@ -1075,10 +1076,11 @@ update_total_bandwidth_weights(const routerstatus_t *rs,
   }
 
   /* Now calculate the total bandwidth weights with or without
-     guardfraction. Depending on the flags of the relay, add its
-     bandwidth to the appropriate weight pool. If it's a guard and
-     guardfraction is enabled, add its bandwidth to both pools as
-     indicated by the previous comment. */
+   * guardfraction. Depending on the flags of the relay, add its
+   * bandwidth to the appropriate weight pool. If it's a guard and
+   * guardfraction is enabled, add its bandwidth to both pools as
+   * indicated by the previous comment.
+   */
   *T += default_bandwidth;
   if (is_exit && is_guard) {
 
index 35bd748d0deb962bfa4a2be75ab92eaa6c70649f..107a562506561920f4177bd0068e1010006b1c5d 100644 (file)
@@ -161,11 +161,11 @@ double pathbias_get_close_success_count(entry_guard_t *guard);
 double pathbias_get_use_success_count(entry_guard_t *guard);
 
 /** Contains the bandwidth of a relay as a guard and as a non-guard
- *  after the guardfraction has been considered.  */
+ *  after the guardfraction has been considered. */
 typedef struct guardfraction_bandwidth_t {
-  /* Bandwidth as a guard after guardfraction has been considered. */
+  /** Bandwidth as a guard after guardfraction has been considered. */
   int guard_bw;
-  /* Bandwidth as a non-guard after guardfraction has been considered. */
+  /** Bandwidth as a non-guard after guardfraction has been considered. */
   int non_guard_bw;
 } guardfraction_bandwidth_t;
 
index 0e8bf8dbe1d9f28b34cf43e8b26ed1b389079641..5a9626f0a247590ad073ccf3763c41e9f39abbd7 100644 (file)
@@ -1827,7 +1827,7 @@ routerstatus_parse_guardfraction(const char *guardfraction_str,
   }
 
   guardfraction = (uint32_t)tor_parse_ulong(end_of_header+1,
-                                         10, 0, 100, &ok, NULL);
+                                            10, 0, 100, &ok, NULL);
   if (!ok) {
     log_warn(LD_DIR, "Invalid GuardFraction %s", escaped(guardfraction_str));
     return -1;
index e9cf8901ffaf2a5c4e4295be09adc14de5f1859e..57063c9085f03d48a37d0bd65b8ec9a80634df1d 100644 (file)
@@ -18,8 +18,8 @@
 #include "test.h"
 #include "test_helpers.h"
 
-/* Generate a vote_routerstatus_t for a router with identity digest
  <b>digest_in_hex</b>. */
+/** Generate a vote_routerstatus_t for a router with identity digest
* <b>digest_in_hex</b>. */
 static vote_routerstatus_t *
 gen_vote_routerstatus_for_tests(const char *digest_in_hex, int is_guard)
 {
@@ -169,7 +169,7 @@ test_parse_guardfraction_file_bad(void *arg)
   tor_free(guardfraction_bad);
 }
 
-/* Make sure that our test guardfraction file gets parsed properly, and
+/** Make sure that our test guardfraction file gets parsed properly, and
  * its information are applied properly to our routerstatuses. */
 static void
 test_parse_guardfraction_file_good(void *arg)
@@ -263,7 +263,7 @@ test_get_guardfraction_bandwidth(void *arg)
 }
 
 /** Parse the GuardFraction element of the consensus, and make sure it
- *  gets parsed correctly. */
+ * gets parsed correctly. */
 static void
 test_parse_guardfraction_consensus(void *arg)
 {
@@ -337,8 +337,8 @@ test_parse_guardfraction_consensus(void *arg)
   ;
 }
 
-/* Make sure that we use GuardFraction information when we should,
  according to the torrc option and consensus parameter. */
+/** Make sure that we use GuardFraction information when we should,
* according to the torrc option and consensus parameter. */
 static void
 test_should_apply_guardfraction(void *arg)
 {