aboutsummaryrefslogtreecommitdiff
path: root/src/feature/dirauth/shared_random_state.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-06-21 11:20:21 -0400
committerNick Mathewson <nickm@torproject.org>2019-07-24 15:21:56 -0400
commitf8b193a74a3967d23bf55c8dcfb5bb2a16692c97 (patch)
tree0fc3d313039069cd4377e57c39c5a4852b51e606 /src/feature/dirauth/shared_random_state.c
parentf306d12b58a9447076b961da072061f65830692c (diff)
downloadtor-f8b193a74a3967d23bf55c8dcfb5bb2a16692c97.tar.gz
tor-f8b193a74a3967d23bf55c8dcfb5bb2a16692c97.zip
Make config_var and config_fmt const.
Now that we have a reasonable implementation for overriding the default options for TestingTorNetwork, we don't need to modify config_var_t structs any more. And therefore, we can have constant format options, like reasonable people.
Diffstat (limited to 'src/feature/dirauth/shared_random_state.c')
-rw-r--r--src/feature/dirauth/shared_random_state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/feature/dirauth/shared_random_state.c b/src/feature/dirauth/shared_random_state.c
index d89f249a72..c2ad3e7cca 100644
--- a/src/feature/dirauth/shared_random_state.c
+++ b/src/feature/dirauth/shared_random_state.c
@@ -65,7 +65,7 @@ disk_state_validate_cb(void *old_state, void *state, void *default_state,
static void disk_state_free_cb(void *);
/* Array of variables that are saved to disk as a persistent state. */
-static config_var_t state_vars[] = {
+static const config_var_t state_vars[] = {
V(Version, POSINT, "0"),
V(TorVersion, STRING, NULL),
V(ValidAfter, ISOTIME, NULL),
@@ -81,7 +81,7 @@ static config_var_t state_vars[] = {
/* "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 struct_member_t state_extra_var = {
+static const struct_member_t state_extra_var = {
.name = "__extra",
.type = CONFIG_TYPE_LINELIST,
.offset = offsetof(sr_disk_state_t, ExtraLines),