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_btrack.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_btrack.c')
-rw-r--r-- | src/test/test_btrack.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test_btrack.c b/src/test/test_btrack.c index 9e5d0d0723..21e88a57b6 100644 --- a/src/test/test_btrack.c +++ b/src/test/test_btrack.c @@ -44,6 +44,8 @@ test_btrack_launch(void *arg) { orconn_state_msg_t conn; ocirc_chan_msg_t circ; + memset(&conn, 0, sizeof(conn)); + memset(&circ, 0, sizeof(circ)); (void)arg; conn.gid = 1; @@ -93,6 +95,8 @@ test_btrack_delete(void *arg) { orconn_state_msg_t state; orconn_status_msg_t status; + memset(&state, 0, sizeof(state)); + memset(&status, 0, sizeof(status)); (void)arg; state.gid = 1; |