diff options
author | Neel Chauhan <neel@neelc.org> | 2017-07-31 19:30:30 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-08-03 08:56:35 -0400 |
commit | 5ee6ca8da22ad8da94c829e6c02c05920742c364 (patch) | |
tree | 4e69b0cc5f825f316aa05b290d2340c94e46c3ea /src/or/statefile.c | |
parent | 02fcb29d11abe9556ab4d118f2f89e557d1751dd (diff) | |
download | tor-5ee6ca8da22ad8da94c829e6c02c05920742c364.tar.gz tor-5ee6ca8da22ad8da94c829e6c02c05920742c364.zip |
Switch to offsetof()
Diffstat (limited to 'src/or/statefile.c')
-rw-r--r-- | src/or/statefile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/statefile.c b/src/or/statefile.c index d0606b3012..aaed104095 100644 --- a/src/or/statefile.c +++ b/src/or/statefile.c @@ -55,7 +55,7 @@ static config_abbrev_t state_abbrevs_[] = { /*XXXX these next two are duplicates or near-duplicates from config.c */ #define VAR(name,conftype,member,initvalue) \ - { name, CONFIG_TYPE_ ## conftype, STRUCT_OFFSET(or_state_t, member), \ + { name, CONFIG_TYPE_ ## conftype, offsetof(or_state_t, member), \ initvalue } /** As VAR, but the option name and member name are the same. */ #define V(member,conftype,initvalue) \ @@ -131,14 +131,14 @@ static int or_state_validate_cb(void *old_options, void *options, /** "Extra" variable in the state that receives lines we can't parse. This * lets us preserve options from versions of Tor newer than us. */ static config_var_t state_extra_var = { - "__extra", CONFIG_TYPE_LINELIST, STRUCT_OFFSET(or_state_t, ExtraLines), NULL + "__extra", CONFIG_TYPE_LINELIST, offsetof(or_state_t, ExtraLines), NULL }; /** Configuration format for or_state_t. */ static const config_format_t state_format = { sizeof(or_state_t), OR_STATE_MAGIC, - STRUCT_OFFSET(or_state_t, magic_), + offsetof(or_state_t, magic_), state_abbrevs_, NULL, state_vars_, |