summaryrefslogtreecommitdiff
path: root/src/or/dirvote.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-08-19 19:44:19 -0400
committerNick Mathewson <nickm@torproject.org>2016-08-19 19:44:19 -0400
commit5aad921e3a02cd96158cc54d309d072ed21b3aba (patch)
tree78d844c3b6b9f354956b4586abec5cabb4438df8 /src/or/dirvote.c
parent3e8f93bb103d3537703c168a82450aeab5f96710 (diff)
downloadtor-5aad921e3a02cd96158cc54d309d072ed21b3aba.tar.gz
tor-5aad921e3a02cd96158cc54d309d072ed21b3aba.zip
Rename free_voting_schedule to voting_schedule_free. Wrap line. Follow if convention.
Diffstat (limited to 'src/or/dirvote.c')
-rw-r--r--src/or/dirvote.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index 7c80868194..9748f4ae4d 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -2577,7 +2577,7 @@ get_next_valid_after_time(time_t now)
tor_assert(new_voting_schedule);
next_valid_after_time = new_voting_schedule->interval_starts;
- free_voting_schedule(new_voting_schedule);
+ voting_schedule_free(new_voting_schedule);
return next_valid_after_time;
}
@@ -2601,7 +2601,7 @@ dirvote_recalculate_timing(const or_options_t *options, time_t now)
/* Fill in the global static struct now */
memcpy(&voting_schedule, new_voting_schedule, sizeof(voting_schedule));
- free_voting_schedule(new_voting_schedule);
+ voting_schedule_free(new_voting_schedule);
}
/* Populate and return a new voting_schedule_t that can be used to schedule
@@ -2660,10 +2660,13 @@ get_voting_schedule(const or_options_t *options, time_t now, int severity)
return new_voting_schedule;
}
-/** Frees a voting_schedule_t. This should be used instead of the generic tor_free. */
+/** Frees a voting_schedule_t. This should be used instead of the generic
+ * tor_free. */
void
-free_voting_schedule(voting_schedule_t *voting_schedule_to_free)
+voting_schedule_free(voting_schedule_t *voting_schedule_to_free)
{
+ if (!voting_schedule_to_free)
+ return;
tor_free(voting_schedule_to_free);
}