From 59317c8a238f49ad298d4f51f42a0f7b16c9cc3c Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 19 Jun 2019 08:34:20 -0400 Subject: Use struct_magic_decl to verify magic numbers in config objects --- src/app/config/statefile.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/app/config/statefile.c') 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_, -- cgit v1.2.3-54-g00ecf