diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-06-28 12:21:49 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-06-28 12:33:27 -0400 |
commit | 68792f77e51f84d0fb6758ef9491a70570ac9a53 (patch) | |
tree | 06f9e80f7d1430efee4bb440692b42f759f7f83b /src/test/test_controller_events.c | |
parent | c34a6b922f3e5ff22c99c70bfe3832b647ce5b49 (diff) | |
download | tor-68792f77e51f84d0fb6758ef9491a70570ac9a53.tar.gz tor-68792f77e51f84d0fb6758ef9491a70570ac9a53.zip |
Fix a few coverity unitinitialzed-value warnings in the unit tests.
Coverity can't see that it is not in fact going to read
uninitialized memory here, so we initialize these values
unconditionally.
Bugfix on 0.4.0.1-alpha.
Diffstat (limited to 'src/test/test_controller_events.c')
-rw-r--r-- | src/test/test_controller_events.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/test_controller_events.c b/src/test/test_controller_events.c index a8967bba50..9fb2bc7256 100644 --- a/src/test/test_controller_events.c +++ b/src/test/test_controller_events.c @@ -429,6 +429,7 @@ static void test_cntev_orconn_state(void *arg) { orconn_state_msg_t conn; + memset(&conn, 0, sizeof(conn)); (void)arg; MOCK(queue_control_event_string, mock_queue_control_event_string); @@ -468,6 +469,7 @@ static void test_cntev_orconn_state_pt(void *arg) { orconn_state_msg_t conn; + memset(&conn, 0, sizeof(conn)); (void)arg; MOCK(queue_control_event_string, mock_queue_control_event_string); @@ -503,6 +505,7 @@ static void test_cntev_orconn_state_proxy(void *arg) { orconn_state_msg_t conn; + memset(&conn, 0, sizeof(conn)); (void)arg; MOCK(queue_control_event_string, mock_queue_control_event_string); |