summaryrefslogtreecommitdiff
path: root/src/or/networkstatus.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-09-21 15:15:17 -0400
committerNick Mathewson <nickm@torproject.org>2016-09-21 15:15:17 -0400
commit266d7733f8f1978ff668698b3d33dc42a865237d (patch)
treec1c1777499f3ae06c06779a1a2d95d7fb7d502d0 /src/or/networkstatus.c
parent2196c7ad6496ae699667af65eb289950f8fe5dbb (diff)
downloadtor-266d7733f8f1978ff668698b3d33dc42a865237d.tar.gz
tor-266d7733f8f1978ff668698b3d33dc42a865237d.zip
fix wide lines
Diffstat (limited to 'src/or/networkstatus.c')
-rw-r--r--src/or/networkstatus.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index 0a32012ed2..c938885705 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -722,7 +722,9 @@ router_get_mutable_consensus_status_by_id(const char *digest)
{
if (!networkstatus_get_latest_consensus())
return NULL;
- return smartlist_bsearch(networkstatus_get_latest_consensus()->routerstatus_list, digest,
+ const smartlist_t *rslist;
+ rslist = networkstatus_get_latest_consensus()->routerstatus_list;
+ return smartlist_bsearch(rslist, digest,
compare_digest_to_routerstatus_entry);
}
@@ -1731,13 +1733,14 @@ networkstatus_set_current_consensus(const char *consensus,
const int is_usable_flavor = flav == usable_consensus_flavor();
if (is_usable_flavor) {
- notify_control_networkstatus_changed(networkstatus_get_latest_consensus(), c);
+ notify_control_networkstatus_changed(
+ networkstatus_get_latest_consensus(), c);
}
if (flav == FLAV_NS) {
if (current_ns_consensus) {
networkstatus_copy_old_consensus_info(c, current_ns_consensus);
networkstatus_vote_free(current_ns_consensus);
- /* Defensive programming : we should set networkstatus_get_latest_consensus() very soon,
+ /* Defensive programming : we should set current_ns_consensus very soon
* but we're about to call some stuff in the meantime, and leaving this
* dangling pointer around has proven to be trouble. */
current_ns_consensus = NULL;
@@ -1956,7 +1959,9 @@ routerstatus_list_update_named_server_map(void)
named_server_map = strmap_new();
strmap_free(unnamed_server_map, NULL);
unnamed_server_map = strmap_new();
- SMARTLIST_FOREACH_BEGIN(networkstatus_get_latest_consensus()->routerstatus_list,
+ const smartlist_t *rslist;
+ rslist = networkstatus_get_latest_consensus()->routerstatus_list;
+ SMARTLIST_FOREACH_BEGIN(rslist,
const routerstatus_t *, rs) {
if (rs->is_named) {
strmap_set_lc(named_server_map, rs->nickname,