diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-04-16 11:51:02 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-04-22 19:43:07 -0400 |
commit | 47163780c3682d881ad6e8044320a57fce439ea1 (patch) | |
tree | dcc67e42a02501a6f07d5e6090b610927eb535ad /src/or/routerlist.c | |
parent | 0f3d73a2d0ef22d51183768308887d0271ef20f0 (diff) | |
download | tor-47163780c3682d881ad6e8044320a57fce439ea1.tar.gz tor-47163780c3682d881ad6e8044320a57fce439ea1.zip |
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.
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |