summaryrefslogtreecommitdiff
path: root/src/feature/dirauth
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-07-25 09:43:50 -0400
committerNick Mathewson <nickm@torproject.org>2019-10-24 20:30:32 -0400
commit27dbf20bf477d3793d295b376713f71bccc7acaf (patch)
tree417cc6f1e82e7daf4df3702c9675121397ff9ef2 /src/feature/dirauth
parent68e1ced607eaed3105b4b3967e2f6af5070da0e4 (diff)
downloadtor-27dbf20bf477d3793d295b376713f71bccc7acaf.tar.gz
tor-27dbf20bf477d3793d295b376713f71bccc7acaf.zip
Use named-member syntax for initializing config_format_t objects
I'm about to mess with their lists of callbacks, and I don't want to proliferate lists where we say "NULL, NULL, NULL, ..."
Diffstat (limited to 'src/feature/dirauth')
-rw-r--r--src/feature/dirauth/shared_random_state.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/feature/dirauth/shared_random_state.c b/src/feature/dirauth/shared_random_state.c
index 94743fdb76..2070e03aa1 100644
--- a/src/feature/dirauth/shared_random_state.c
+++ b/src/feature/dirauth/shared_random_state.c
@@ -87,19 +87,16 @@ static const struct_member_t state_extra_var = {
/** Configuration format of sr_disk_state_t. */
static const config_format_t state_format = {
- sizeof(sr_disk_state_t),
- {
+ .size = sizeof(sr_disk_state_t),
+ .magic = {
"sr_disk_state_t",
SR_DISK_STATE_MAGIC,
offsetof(sr_disk_state_t, magic_),
},
- NULL,
- NULL,
- state_vars,
- disk_state_validate_cb,
- NULL,
- &state_extra_var,
- -1,
+ .vars = state_vars,
+ .validate_fn = disk_state_validate_cb,
+ .extra = &state_extra_var,
+ .config_suite_offset = -1,
};
/** Global configuration manager for the shared-random state file */