summaryrefslogtreecommitdiff
path: root/src/app/config/statefile.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-06-19 08:34:20 -0400
committerNick Mathewson <nickm@torproject.org>2019-06-25 12:51:25 -0400
commit59317c8a238f49ad298d4f51f42a0f7b16c9cc3c (patch)
tree1460e526b36de8f52788f585ef8760def3cd8fb2 /src/app/config/statefile.c
parent3a4d67cf45dc1c94a33479c852a3dd7cbd4ebc95 (diff)
downloadtor-59317c8a238f49ad298d4f51f42a0f7b16c9cc3c.tar.gz
tor-59317c8a238f49ad298d4f51f42a0f7b16c9cc3c.zip
Use struct_magic_decl to verify magic numbers in config objects
Diffstat (limited to 'src/app/config/statefile.c')
-rw-r--r--src/app/config/statefile.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/app/config/statefile.c b/src/app/config/statefile.c
index 358b02f602..331592c3a6 100644
--- a/src/app/config/statefile.c
+++ b/src/app/config/statefile.c
@@ -166,8 +166,11 @@ static struct_member_t state_extra_var = {
/** Configuration format for or_state_t. */
static const config_format_t state_format = {
sizeof(or_state_t),
- OR_STATE_MAGIC,
- offsetof(or_state_t, magic_),
+ {
+ "or_state_t",
+ OR_STATE_MAGIC,
+ offsetof(or_state_t, magic_),
+ },
state_abbrevs_,
NULL,
state_vars_,