summaryrefslogtreecommitdiff
path: root/src/or/nodelist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-04-17 19:41:10 -0400
committerNick Mathewson <nickm@torproject.org>2018-04-17 19:41:10 -0400
commit31a450a5b69a88fd9f38b1ca043952009ffddbf7 (patch)
treeed78ff9f9a8613649376d12b648ab65105c4f84a /src/or/nodelist.c
parentd67d3dd1456edf20e79bd1ba105536bdcdbfc4dc (diff)
downloadtor-31a450a5b69a88fd9f38b1ca043952009ffddbf7.tar.gz
tor-31a450a5b69a88fd9f38b1ca043952009ffddbf7.zip
Add a redundant memset to node_get_pref_ipv6_orport()
For whatever reason, clang's scan-build isn't sure that this function actually initializes its output.
Diffstat (limited to 'src/or/nodelist.c')
-rw-r--r--src/or/nodelist.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 71eee3fa21..81a5c944ac 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -1517,6 +1517,7 @@ node_get_pref_ipv6_orport(const node_t *node, tor_addr_port_t *ap_out)
{
node_assert_ok(node);
tor_assert(ap_out);
+ memset(ap_out, 0, sizeof(*ap_out));
/* Check ri first, because rewrite_node_address_for_bridge() updates
* node->ri with the configured bridge address.