summaryrefslogtreecommitdiff
path: root/src/or/dirvote.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-06-14 13:01:38 -0400
committerNick Mathewson <nickm@torproject.org>2011-06-14 13:17:06 -0400
commit47c8433a0c3c579588e1e5d4f67f16843ba26bca (patch)
treea6424ad37a2337eb1dc24de50e1f3adc75c2c497 /src/or/dirvote.c
parent22efe2030901e7ef878c8ec358e819bbdb1239f6 (diff)
downloadtor-47c8433a0c3c579588e1e5d4f67f16843ba26bca.tar.gz
tor-47c8433a0c3c579588e1e5d4f67f16843ba26bca.zip
Make the get_options() return const
This lets us make a lot of other stuff const, allows the compiler to generate (slightly) better code, and will make me get slightly fewer patches from folks who stick mutable stuff into or_options_t. const: because not every input is an output!
Diffstat (limited to 'src/or/dirvote.c')
-rw-r--r--src/or/dirvote.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index e77b4feb48..bf34c62af3 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -2504,7 +2504,7 @@ authority_cert_dup(authority_cert_t *cert)
void
dirvote_get_preferred_voting_intervals(vote_timing_t *timing_out)
{
- or_options_t *options = get_options();
+ const or_options_t *options = get_options();
tor_assert(timing_out);
@@ -2578,7 +2578,7 @@ static struct {
/** Set voting_schedule to hold the timing for the next vote we should be
* doing. */
void
-dirvote_recalculate_timing(or_options_t *options, time_t now)
+dirvote_recalculate_timing(const or_options_t *options, time_t now)
{
int interval, vote_delay, dist_delay;
time_t start;
@@ -2629,7 +2629,7 @@ dirvote_recalculate_timing(or_options_t *options, time_t now)
/** Entry point: Take whatever voting actions are pending as of <b>now</b>. */
void
-dirvote_act(or_options_t *options, time_t now)
+dirvote_act(const or_options_t *options, time_t now)
{
if (!authdir_mode_v3(options))
return;