Fix wide lines in dirauth/dirvote.*

This commit is contained in:
Nick Mathewson 2018-06-21 14:23:32 -04:00
parent 7f2dbbe585
commit 8dcc015975
2 changed files with 7 additions and 8 deletions

View File

@ -4235,7 +4235,7 @@ routers_make_ed_keys_unique(smartlist_t *routers)
if (ri2_pub < ri_pub || if (ri2_pub < ri_pub ||
(ri2_pub == ri_pub && (ri2_pub == ri_pub &&
fast_memcmp(ri->cache_info.signed_descriptor_digest, fast_memcmp(ri->cache_info.signed_descriptor_digest,
ri2->cache_info.signed_descriptor_digest,DIGEST_LEN)<0)) { ri2->cache_info.signed_descriptor_digest,DIGEST_LEN)<0)) {
digest256map_set(by_ed_key, pk, ri); digest256map_set(by_ed_key, pk, ri);
ri2->omit_from_vote = 1; ri2->omit_from_vote = 1;
} else { } else {
@ -4408,10 +4408,10 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key,
vrs->protocols = tor_strdup(ri->protocol_list); vrs->protocols = tor_strdup(ri->protocol_list);
} else { } else {
vrs->protocols = tor_strdup( vrs->protocols = tor_strdup(
protover_compute_for_old_tor(vrs->version)); protover_compute_for_old_tor(vrs->version));
} }
vrs->microdesc = dirvote_format_all_microdesc_vote_lines(ri, now, vrs->microdesc = dirvote_format_all_microdesc_vote_lines(ri, now,
microdescriptors); microdescriptors);
smartlist_add(routerstatuses, vrs); smartlist_add(routerstatuses, vrs);
} }
@ -4504,9 +4504,9 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key,
/* We should not recommend anything we don't have. */ /* We should not recommend anything we don't have. */
tor_assert_nonfatal(protover_all_supported( tor_assert_nonfatal(protover_all_supported(
v3_out->recommended_relay_protocols, NULL)); v3_out->recommended_relay_protocols, NULL));
tor_assert_nonfatal(protover_all_supported( tor_assert_nonfatal(protover_all_supported(
v3_out->recommended_client_protocols, NULL)); v3_out->recommended_client_protocols, NULL));
v3_out->package_lines = smartlist_new(); v3_out->package_lines = smartlist_new();
{ {
@ -4562,4 +4562,3 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key,
return v3_out; return v3_out;
} }

View File

@ -164,7 +164,8 @@ dirvote_add_vote(const char *vote_body, const char **msg_out, int *status_out)
} }
static inline int static inline int
dirvote_add_signatures(const char *detached_signatures_body, const char *source, dirvote_add_signatures(const char *detached_signatures_body,
const char *source,
const char **msg_out) const char **msg_out)
{ {
(void) detached_signatures_body; (void) detached_signatures_body;
@ -244,4 +245,3 @@ STATIC microdesc_t *dirvote_create_microdescriptor(const routerinfo_t *ri,
#endif /* defined(DIRVOTE_PRIVATE) */ #endif /* defined(DIRVOTE_PRIVATE) */
#endif /* !defined(TOR_DIRVOTE_H) */ #endif /* !defined(TOR_DIRVOTE_H) */