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/shared_random_state.c | |
parent | 02fcb29d11abe9556ab4d118f2f89e557d1751dd (diff) | |
download | tor-5ee6ca8da22ad8da94c829e6c02c05920742c364.tar.gz tor-5ee6ca8da22ad8da94c829e6c02c05920742c364.zip |
Switch to offsetof()
Diffstat (limited to 'src/or/shared_random_state.c')
-rw-r--r-- | src/or/shared_random_state.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/shared_random_state.c b/src/or/shared_random_state.c index 89d2e8d7f6..ef026e7f23 100644 --- a/src/or/shared_random_state.c +++ b/src/or/shared_random_state.c @@ -42,7 +42,7 @@ static const char dstate_cur_srv_key[] = "SharedRandCurrentValue"; /* These next two are duplicates or near-duplicates from config.c */ #define VAR(name, conftype, member, initvalue) \ - { name, CONFIG_TYPE_ ## conftype, STRUCT_OFFSET(sr_disk_state_t, member), \ + { name, CONFIG_TYPE_ ## conftype, offsetof(sr_disk_state_t, member), \ initvalue } /* As VAR, but the option name and member name are the same. */ #define V(member, conftype, initvalue) \ @@ -77,14 +77,14 @@ static config_var_t state_vars[] = { * lets us preserve options from versions of Tor newer than us. */ static config_var_t state_extra_var = { "__extra", CONFIG_TYPE_LINELIST, - STRUCT_OFFSET(sr_disk_state_t, ExtraLines), NULL + offsetof(sr_disk_state_t, ExtraLines), NULL }; /* Configuration format of sr_disk_state_t. */ static const config_format_t state_format = { sizeof(sr_disk_state_t), SR_DISK_STATE_MAGIC, - STRUCT_OFFSET(sr_disk_state_t, magic_), + offsetof(sr_disk_state_t, magic_), NULL, NULL, state_vars, |