summaryrefslogtreecommitdiff
path: root/src/or/dirvote.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-09-02 11:58:08 -0400
committerNick Mathewson <nickm@torproject.org>2014-09-02 11:58:08 -0400
commite3c143f5214b4a2d37dbb47940eaf2cc2e212f86 (patch)
tree9dc89abc6d5816ae8ced5764124b50238eadce2b /src/or/dirvote.c
parent67c0ad54263be7fb742a8d499f97f5908f9ec970 (diff)
parentefcab439564dcadc5bc14609a9205d73d236e966 (diff)
downloadtor-e3c143f5214b4a2d37dbb47940eaf2cc2e212f86.tar.gz
tor-e3c143f5214b4a2d37dbb47940eaf2cc2e212f86.zip
Merge remote-tracking branch 'origin/maint-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 6f60e05b17..9ad92ca116 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -334,6 +334,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;
@@ -431,6 +434,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) {