summaryrefslogtreecommitdiff
path: root/src/or/nodelist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-04-16 11:51:02 -0400
committerNick Mathewson <nickm@torproject.org>2018-04-22 19:43:07 -0400
commit47163780c3682d881ad6e8044320a57fce439ea1 (patch)
treedcc67e42a02501a6f07d5e6090b610927eb535ad /src/or/nodelist.c
parent0f3d73a2d0ef22d51183768308887d0271ef20f0 (diff)
downloadtor-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/nodelist.c')
-rw-r--r--src/or/nodelist.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 2962d3cb40..212606d2f7 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -1131,10 +1131,13 @@ node_is_dir(const node_t *node)
}
}
-/** Return true iff <b>node</b> has either kind of usable descriptor -- that
- * is, a routerdescriptor or a microdescriptor. */
+/** Return true iff <b>node</b> has either kind of descriptor -- that
+ * is, a routerdescriptor or a microdescriptor.
+ *
+ * You should probably use node_has_preferred_descriptor() instead.
+ **/
int
-node_has_descriptor(const node_t *node)
+node_has_any_descriptor(const node_t *node)
{
return (node->ri ||
(node->rs && node->md));