summaryrefslogtreecommitdiff
path: root/src/or/dirvote.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-05-15 20:12:20 -0400
committerNick Mathewson <nickm@torproject.org>2011-05-15 20:12:20 -0400
commit68acfefbdb7a25ac1585c9480a8c98cadca50b7a (patch)
tree42b6ff228bb1836f2309bef4ff5ef940506badff /src/or/dirvote.c
parentced06a80097d2c4f26b1f44447710ec33b9d2421 (diff)
parentbc44393eb59a1d303314b4b646b4d815f4eadc22 (diff)
downloadtor-68acfefbdb7a25ac1585c9480a8c98cadca50b7a.tar.gz
tor-68acfefbdb7a25ac1585c9480a8c98cadca50b7a.zip
Merge remote-tracking branch 'origin/maint-0.2.2'
Diffstat (limited to 'src/or/dirvote.c')
-rw-r--r--src/or/dirvote.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index 6fe29f2f4f..15174c1dc3 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -394,8 +394,9 @@ compare_vote_rs(const vote_routerstatus_t *a, const vote_routerstatus_t *b)
if ((r = fast_memcmp(a->status.identity_digest, b->status.identity_digest,
DIGEST_LEN)))
return r;
- if ((r = fast_memcmp(a->status.descriptor_digest, b->status.descriptor_digest,
- DIGEST_LEN)))
+ if ((r = fast_memcmp(a->status.descriptor_digest,
+ b->status.descriptor_digest,
+ DIGEST_LEN)))
return r;
if ((r = (int)(b->status.published_on - a->status.published_on)))
return r;
@@ -1698,7 +1699,8 @@ networkstatus_compute_consensus(smartlist_t *votes,
if (index[v_sl_idx] < size[v_sl_idx]) {
rs = smartlist_get(v->routerstatus_list, index[v_sl_idx]);
if (!lowest_id ||
- fast_memcmp(rs->status.identity_digest, lowest_id, DIGEST_LEN) < 0)
+ fast_memcmp(rs->status.identity_digest,
+ lowest_id, DIGEST_LEN) < 0)
lowest_id = rs->status.identity_digest;
}
});
@@ -1762,7 +1764,7 @@ networkstatus_compute_consensus(smartlist_t *votes,
rs = compute_routerstatus_consensus(matching_descs, consensus_method,
microdesc_digest);
/* Copy bits of that into rs_out. */
- tor_assert(fast_memeq(lowest_id, rs->status.identity_digest, DIGEST_LEN));
+ tor_assert(fast_memeq(lowest_id, rs->status.identity_digest,DIGEST_LEN));
memcpy(rs_out.identity_digest, lowest_id, DIGEST_LEN);
memcpy(rs_out.descriptor_digest, rs->status.descriptor_digest,
DIGEST_LEN);
@@ -2204,7 +2206,8 @@ networkstatus_add_detached_signatures(networkstatus_t *target,
}
for (alg = DIGEST_SHA1; alg < N_DIGEST_ALGORITHMS; ++alg) {
if (!tor_mem_is_zero(digests->d[alg], DIGEST256_LEN)) {
- if (fast_memeq(target->digests.d[alg], digests->d[alg], DIGEST256_LEN)) {
+ if (fast_memeq(target->digests.d[alg], digests->d[alg],
+ DIGEST256_LEN)) {
++n_matches;
} else {
*msg_out = "Mismatched digest.";