summaryrefslogtreecommitdiff
path: root/src/or/dirvote.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-09-02 12:07:39 -0400
committerNick Mathewson <nickm@torproject.org>2014-09-02 12:07:39 -0400
commit475c95f28a70fff665a4b6a608a4d3a61c2c77d9 (patch)
tree4c2fd2e767b3f2dcf243abe98b56f1e27f340a79 /src/or/dirvote.c
parentb969ee9dad0c582bf470c189beba458293f342a8 (diff)
parentefcab439564dcadc5bc14609a9205d73d236e966 (diff)
downloadtor-475c95f28a70fff665a4b6a608a4d3a61c2c77d9.tar.gz
tor-475c95f28a70fff665a4b6a608a4d3a61c2c77d9.zip
Merge remote-tracking branch 'origin/maint-0.2.5' into release-0.2.5
Diffstat (limited to 'src/or/dirvote.c')
-rw-r--r--src/or/dirvote.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index c7be343ca2..137d6c1a8c 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -335,6 +335,9 @@ static int
compare_vote_rs(const vote_routerstatus_t *a, const vote_routerstatus_t *b)
{
int r;
+ tor_assert(a);
+ tor_assert(b);
+
if ((r = fast_memcmp(a->status.identity_digest, b->status.identity_digest,
DIGEST_LEN)))
return r;
@@ -432,6 +435,7 @@ compute_routerstatus_consensus(smartlist_t *votes, int consensus_method,
const tor_addr_port_t *most_alt_orport = NULL;
SMARTLIST_FOREACH_BEGIN(votes, vote_routerstatus_t *, rs) {
+ tor_assert(rs);
if (compare_vote_rs(most, rs) == 0 &&
!tor_addr_is_null(&rs->status.ipv6_addr)
&& rs->status.ipv6_orport) {