summaryrefslogtreecommitdiff
path: root/src/feature/dirauth/shared_random_state.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-04-30 22:56:31 -0400
committerNick Mathewson <nickm@torproject.org>2020-04-30 22:56:31 -0400
commitd7e166bd95411d3f5caa573e0293356bff78c481 (patch)
tree5261d866a9330ac5d879fd7f537f030f80254f96 /src/feature/dirauth/shared_random_state.c
parent987f2fa50ac26af61917c7a6e13dc62f3ddb23ee (diff)
downloadtor-d7e166bd95411d3f5caa573e0293356bff78c481.tar.gz
tor-d7e166bd95411d3f5caa573e0293356bff78c481.zip
Fix a GCC 10.0.1 compilation warning.
Fixes 34077 for 0.4.1; bugfix on 0.4.0.3-alpha. (Specifically, GCC first gives this warning for 9eeff921ae7b786d960ea4286d5bba56)
Diffstat (limited to 'src/feature/dirauth/shared_random_state.c')
-rw-r--r--src/feature/dirauth/shared_random_state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/feature/dirauth/shared_random_state.c b/src/feature/dirauth/shared_random_state.c
index b669e3836e..58c203e204 100644
--- a/src/feature/dirauth/shared_random_state.c
+++ b/src/feature/dirauth/shared_random_state.c
@@ -1057,8 +1057,9 @@ sr_state_set_valid_after(time_t valid_after)
sr_phase_t
sr_state_get_phase(void)
{
- void *ptr;
+ void *ptr=NULL;
state_query(SR_STATE_ACTION_GET, SR_STATE_OBJ_PHASE, NULL, &ptr);
+ tor_assert(ptr);
return *(sr_phase_t *) ptr;
}