]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add an extra check in test_entrynodes
authorNick Mathewson <nickm@torproject.org>
Sat, 18 Nov 2017 15:26:45 +0000 (10:26 -0500)
committerNick Mathewson <nickm@torproject.org>
Sat, 18 Nov 2017 15:26:45 +0000 (10:26 -0500)
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.

src/test/test_entrynodes.c

index 43cc394888d093b33ad22919db13236de062bcd3..80ebebe3f8d6feb2c069344136854181e3b5e9a3 100644 (file)
@@ -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);