From 47163780c3682d881ad6e8044320a57fce439ea1 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 16 Apr 2018 11:51:02 -0400 Subject: Rename node_has_descriptor() to node_has_any_descriptor() Changing the name of this function should help keep us from misusing it when node_has_preferred_descriptor() would be more appropriate. --- src/or/routerlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/or/routerlist.c') diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 2ab5017b7a..1bfbd9f670 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -2758,7 +2758,7 @@ frac_nodes_with_descriptors(const smartlist_t *sl, total <= 0.0) { int n_with_descs = 0; SMARTLIST_FOREACH(sl, const node_t *, node, { - if (node_has_descriptor(node)) + if (node_has_any_descriptor(node)) n_with_descs++; }); return ((double)n_with_descs) / (double)smartlist_len(sl); @@ -2766,7 +2766,7 @@ frac_nodes_with_descriptors(const smartlist_t *sl, present = 0.0; SMARTLIST_FOREACH_BEGIN(sl, const node_t *, node) { - if (node_has_descriptor(node)) + if (node_has_any_descriptor(node)) present += bandwidths[node_sl_idx]; } SMARTLIST_FOREACH_END(node); -- cgit v1.2.3-54-g00ecf