summaryrefslogtreecommitdiff
path: root/src/app/config/statefile.c
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/app/config/statefile.c
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/app/config/statefile.c')
-rw-r--r--src/app/config/statefile.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/app/config/statefile.c b/src/app/config/statefile.c
index 5c2e37490b..2e5edc41c9 100644
--- a/src/app/config/statefile.c
+++ b/src/app/config/statefile.c
@@ -157,19 +157,17 @@ static struct_member_t state_extra_var = {
/** Configuration format for or_state_t. */
static const config_format_t state_format = {
- sizeof(or_state_t),
- {
+ .size = sizeof(or_state_t),
+ .magic = {
"or_state_t",
OR_STATE_MAGIC,
offsetof(or_state_t, magic_),
},
- state_abbrevs_,
- NULL,
- state_vars_,
- or_state_validate_cb,
- NULL,
- &state_extra_var,
- offsetof(or_state_t, substates_),
+ .abbrevs = state_abbrevs_,
+ .vars = state_vars_,
+ .validate_fn = or_state_validate_cb,
+ .extra = &state_extra_var,
+ .config_suite_offset = offsetof(or_state_t, substates_),
};
/* A global configuration manager for state-file objects */