aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-11-18 10:26:45 -0500
committerNick Mathewson <nickm@torproject.org>2017-11-18 10:26:45 -0500
commitd45bf0c65caa98b6e41046c22fbecf76cd8e1f8d (patch)
tree0a5be4942afd98aa61ad5b67f0fe7e3df0e5fc8a /src
parenta5b8b55c1c39febdb0f8a2bc0294e040da21869a (diff)
downloadtor-d45bf0c65caa98b6e41046c22fbecf76cd8e1f8d.tar.gz
tor-d45bf0c65caa98b6e41046c22fbecf76cd8e1f8d.zip
Add an extra check in test_entrynodes
This check makes it so we can reach "done" without setting "conn", and so the "if (conn)" check will not be redundant, and so coverity won't complain. Fixes CID 1422205. Not actually a bug.
Diffstat (limited to 'src')
-rw-r--r--src/test/test_entrynodes.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/test_entrynodes.c b/src/test/test_entrynodes.c
index 43cc394888..80ebebe3f8 100644
--- a/src/test/test_entrynodes.c
+++ b/src/test/test_entrynodes.c
@@ -2721,6 +2721,8 @@ test_entry_guard_outdated_dirserver_exclusion(void *arg)
smartlist_add(digests, (char*)prose);
}
+ tt_int_op(smartlist_len(digests), OP_EQ, 20);
+
/* ... now mock some functions */
mock_ns_val = tor_malloc_zero(sizeof(networkstatus_t));
MOCK(networkstatus_get_latest_consensus_by_flavor, mock_ns_get_by_flavor);