From 0e4bdc400576ba71ae885e94d32adc0e79e8e7fc Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Wed, 18 Feb 2015 19:27:02 -0500 Subject: clean up comments and whitespace a bit --- src/or/dirvote.c | 12 +++++++----- src/or/entrynodes.h | 6 +++--- src/or/routerparse.c | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) (limited to 'src/or') diff --git a/src/or/dirvote.c b/src/or/dirvote.c index f5694bab62..7a5154dae5 100644 --- a/src/or/dirvote.c +++ b/src/or/dirvote.c @@ -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) { diff --git a/src/or/entrynodes.h b/src/or/entrynodes.h index 35bd748d0d..107a562506 100644 --- a/src/or/entrynodes.h +++ b/src/or/entrynodes.h @@ -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; diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 0e8bf8dbe1..5a9626f0a2 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -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; -- cgit v1.2.3-54-g00ecf