mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 20:33:31 +01:00
Rename free_voting_schedule to voting_schedule_free. Wrap line. Follow if convention.
This commit is contained in:
parent
3e8f93bb10
commit
5aad921e3a
@ -2577,7 +2577,7 @@ get_next_valid_after_time(time_t now)
|
|||||||
tor_assert(new_voting_schedule);
|
tor_assert(new_voting_schedule);
|
||||||
|
|
||||||
next_valid_after_time = new_voting_schedule->interval_starts;
|
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;
|
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 */
|
/* Fill in the global static struct now */
|
||||||
memcpy(&voting_schedule, new_voting_schedule, sizeof(voting_schedule));
|
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
|
/* 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;
|
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
|
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);
|
tor_free(voting_schedule_to_free);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ typedef struct {
|
|||||||
voting_schedule_t *get_voting_schedule(const or_options_t *options,
|
voting_schedule_t *get_voting_schedule(const or_options_t *options,
|
||||||
time_t now, int severity);
|
time_t now, int severity);
|
||||||
|
|
||||||
void free_voting_schedule(voting_schedule_t *voting_schedule_to_free);
|
void voting_schedule_free(voting_schedule_t *voting_schedule_to_free);
|
||||||
|
|
||||||
void dirvote_get_preferred_voting_intervals(vote_timing_t *timing_out);
|
void dirvote_get_preferred_voting_intervals(vote_timing_t *timing_out);
|
||||||
time_t dirvote_get_start_of_next_interval(time_t now,
|
time_t dirvote_get_start_of_next_interval(time_t now,
|
||||||
|
@ -1328,7 +1328,7 @@ sr_act_post_consensus(const networkstatus_t *consensus)
|
|||||||
get_voting_schedule(options,time(NULL), LOG_NOTICE);
|
get_voting_schedule(options,time(NULL), LOG_NOTICE);
|
||||||
time_t interval_starts = voting_schedule->interval_starts;
|
time_t interval_starts = voting_schedule->interval_starts;
|
||||||
sr_state_update(interval_starts);
|
sr_state_update(interval_starts);
|
||||||
free_voting_schedule(voting_schedule);
|
voting_schedule_free(voting_schedule);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ get_start_time_of_current_round(time_t now)
|
|||||||
voting_interval,
|
voting_interval,
|
||||||
options->TestingV3AuthVotingStartOffset);
|
options->TestingV3AuthVotingStartOffset);
|
||||||
|
|
||||||
free_voting_schedule(new_voting_schedule);
|
voting_schedule_free(new_voting_schedule);
|
||||||
|
|
||||||
return curr_start;
|
return curr_start;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user