summaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2016-11-09 11:15:48 +1100
committerteor <teor2345@gmail.com>2016-11-09 11:15:48 +1100
commit5dca9487c422f06a056711591c3f8f4344fd075f (patch)
treeda87ecc91b1582b06491c14c1590b3321e3b742a /src/or/circuituse.c
parent89ec191b6885d8e65f7cbdf1a56e2627c3aec75a (diff)
downloadtor-5dca9487c422f06a056711591c3f8f4344fd075f.tar.gz
tor-5dca9487c422f06a056711591c3f8f4344fd075f.zip
Call get_options() once at the top of circuit_log_ancient_one_hop_circuits()
Refactoring, no behaviour change.
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index f344703331..18cd7e3a5b 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -797,6 +797,7 @@ circuit_log_ancient_one_hop_circuits(int age)
time_t cutoff = now - age;
int n_found = 0;
smartlist_t *log_these = smartlist_new();
+ const or_options_t *options = get_options();
SMARTLIST_FOREACH_BEGIN(circuit_get_global_list(), circuit_t *, circ) {
const origin_circuit_t *ocirc;
@@ -839,7 +840,7 @@ circuit_log_ancient_one_hop_circuits(int age)
tor_asprintf(&dirty, "Dirty since %s (%ld seconds vs %ld-second cutoff)",
dirty_since, (long)(now - circ->timestamp_dirty),
- (long) get_options()->MaxCircuitDirtiness);
+ (long) options->MaxCircuitDirtiness);
} else {
dirty = tor_strdup("Not marked dirty");
}