summaryrefslogtreecommitdiff
path: root/src/app/config/statefile.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-06-20 15:55:59 -0400
committerNick Mathewson <nickm@torproject.org>2019-06-25 12:51:25 -0400
commitc553750e32d1bf669a3e8308fa44319954a627ca (patch)
treef6e7ef8bb77e5be7022ddfbb8f348f97ea437fc4 /src/app/config/statefile.c
parent4d101b39d74fb467d7fb4ad8ddb27e07c3074a69 (diff)
downloadtor-c553750e32d1bf669a3e8308fa44319954a627ca.tar.gz
tor-c553750e32d1bf669a3e8308fa44319954a627ca.zip
Move responsibility for config var macros
The testing-only parts now live in a conftesting.h; the shared parts of the macros live in confmacros.h
Diffstat (limited to 'src/app/config/statefile.c')
-rw-r--r--src/app/config/statefile.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/app/config/statefile.c b/src/app/config/statefile.c
index 331592c3a6..e0584c62af 100644
--- a/src/app/config/statefile.c
+++ b/src/app/config/statefile.c
@@ -70,14 +70,9 @@ static config_abbrev_t state_abbrevs_[] = {
* members with CONF_CHECK_VAR_TYPE. */
DUMMY_TYPECHECK_INSTANCE(or_state_t);
-/*XXXX these next two are duplicates or near-duplicates from config.c */
#define VAR(varname,conftype,member,initvalue) \
- { { .name = varname, \
- .type = CONFIG_TYPE_ ## conftype, \
- .offset = offsetof(or_state_t, member), }, \
- initvalue CONF_TEST_MEMBERS(or_state_t, conftype, member) }
-/** As VAR, but the option name and member name are the same. */
-#define V(member,conftype,initvalue) \
+ CONFIG_VAR_ETYPE(or_state_t, varname, conftype, member, initvalue)
+#define V(member,conftype,initvalue) \
VAR(#member, conftype, member, initvalue)
/** Array of "state" variables saved to the ~/.tor/state file. */