summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2021-02-08 11:09:29 -0500
committerDavid Goulet <dgoulet@torproject.org>2021-02-08 11:09:29 -0500
commit841ee4641ef75e2bb4c7400641ab257e67b6bcce (patch)
tree16b4ba8f9d408387cfa2fcd9b0feb9e577e1ed39
parentf420eacf1858220f1cb284353f975e03464b15e4 (diff)
downloadtor-841ee4641ef75e2bb4c7400641ab257e67b6bcce.tar.gz
tor-841ee4641ef75e2bb4c7400641ab257e67b6bcce.zip
relay: Fix Coverity warning for unchecked returned value
Signed-off-by: David Goulet <dgoulet@torproject.org>
-rw-r--r--src/feature/relay/router.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c
index 4bc71eb486..60f237a700 100644
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@ -2673,9 +2673,13 @@ check_descriptor_ipaddress_changed(time_t now)
/* Attempt to discovery the publishable address for the family which will
* actively attempt to discover the address if we are configured with a
- * port for the family. */
- relay_find_addr_to_publish(get_options(), family, RELAY_FIND_ADDR_NO_FLAG,
- &current);
+ * port for the family.
+ *
+ * It is OK to ignore the returned value here since in the failure case,
+ * that is the address was not found, the current value is set to UNSPEC.
+ * Add this (void) so Coverity is happy. */
+ (void) relay_find_addr_to_publish(get_options(), family,
+ RELAY_FIND_ADDR_NO_FLAG, &current);
/* The "current" address might be UNSPEC meaning it was not discovered nor
* found in our current cache. If we had an address before and we have