aboutsummaryrefslogtreecommitdiff
path: root/src/feature/nodelist/nodelist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-04-26 10:36:49 -0400
committerNick Mathewson <nickm@torproject.org>2019-04-26 10:36:49 -0400
commit1d44ac9acd6264141615b5fce6d537544dc6f52e (patch)
treed945147e0593271bcc77a34f048c937cb3087b9b /src/feature/nodelist/nodelist.c
parentefeb101b968fe6604ff97604afe527a36b94cfc9 (diff)
downloadtor-1d44ac9acd6264141615b5fce6d537544dc6f52e.tar.gz
tor-1d44ac9acd6264141615b5fce6d537544dc6f52e.zip
Make nodelist_get_list() return a const pointer.
Diffstat (limited to 'src/feature/nodelist/nodelist.c')
-rw-r--r--src/feature/nodelist/nodelist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/feature/nodelist/nodelist.c b/src/feature/nodelist/nodelist.c
index f878d47fd7..8aa4915107 100644
--- a/src/feature/nodelist/nodelist.c
+++ b/src/feature/nodelist/nodelist.c
@@ -944,7 +944,7 @@ nodelist_ensure_freshness(networkstatus_t *ns)
/** Return a list of a node_t * for every node we know about. The caller
* MUST NOT modify the list. (You can set and clear flags in the nodes if
* you must, but you must not add or remove nodes.) */
-MOCK_IMPL(smartlist_t *,
+MOCK_IMPL(const smartlist_t *,
nodelist_get_list,(void))
{
init_nodelist();
@@ -1939,7 +1939,7 @@ node_set_country(node_t *node)
void
nodelist_refresh_countries(void)
{
- smartlist_t *nodes = nodelist_get_list();
+ const smartlist_t *nodes = nodelist_get_list();
SMARTLIST_FOREACH(nodes, node_t *, node,
node_set_country(node));
}