[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Make node_get_curve25519_onion_key() return a const ptr
commit a5ef2b619d267c38723c150d7945f17268c2fb6e
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Sun Nov 12 17:07:16 2017 -0500
Make node_get_curve25519_onion_key() return a const ptr
---
src/or/nodelist.c | 2 +-
src/or/nodelist.h | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index cb324e9b0..1ab385cd3 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -1640,7 +1640,7 @@ node_has_curve25519_onion_key(const node_t *node)
}
/** Return the curve25519 key of <b>node</b>, or NULL if none. */
-curve25519_public_key_t *
+const curve25519_public_key_t *
node_get_curve25519_onion_key(const node_t *node)
{
if (node->ri)
diff --git a/src/or/nodelist.h b/src/or/nodelist.h
index 2922b6e2d..e879b4e8f 100644
--- a/src/or/nodelist.h
+++ b/src/or/nodelist.h
@@ -86,7 +86,8 @@ int node_get_prim_dirport(const node_t *node, tor_addr_port_t *ap_out);
void node_get_pref_dirport(const node_t *node, tor_addr_port_t *ap_out);
void node_get_pref_ipv6_dirport(const node_t *node, tor_addr_port_t *ap_out);
int node_has_curve25519_onion_key(const node_t *node);
-curve25519_public_key_t *node_get_curve25519_onion_key(const node_t *node);
+const curve25519_public_key_t *node_get_curve25519_onion_key(
+ const node_t *node);
MOCK_DECL(smartlist_t *, nodelist_get_list, (void));
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits