[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] selftest: turn can_reach_{dir, or}_port into bools
commit 6c3897826a21734d2ab4f621df62e337d8bb8391
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Wed Jun 17 16:27:14 2020 -0400
selftest: turn can_reach_{dir,or}_port into bools
---
src/feature/relay/selftest.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/feature/relay/selftest.c b/src/feature/relay/selftest.c
index 2b0fc951b..834e8cf0a 100644
--- a/src/feature/relay/selftest.c
+++ b/src/feature/relay/selftest.c
@@ -45,15 +45,15 @@
#include "feature/relay/selftest.h"
/** Whether we can reach our ORPort from the outside. */
-static int can_reach_or_port = 0;
+static bool can_reach_or_port = false;
/** Whether we can reach our DirPort from the outside. */
-static int can_reach_dir_port = 0;
+static bool can_reach_dir_port = false;
/** Forget what we have learned about our reachability status. */
void
router_reset_reachability(void)
{
- can_reach_or_port = can_reach_dir_port = 0;
+ can_reach_or_port = can_reach_dir_port = false;
}
/** Return 1 if we won't do reachability checks, because:
@@ -358,7 +358,7 @@ router_orport_found_reachable(void)
options->PublishServerDescriptor_ != NO_DIRINFO
&& router_should_skip_dirport_reachability_check(options) ?
" Publishing server descriptor." : "");
- can_reach_or_port = 1;
+ can_reach_or_port = true;
mark_my_descriptor_dirty("ORPort found reachable");
/* This is a significant enough change to upload immediately,
* at least in a test network */
@@ -390,7 +390,7 @@ router_dirport_found_reachable(void)
options->PublishServerDescriptor_ != NO_DIRINFO
&& router_should_skip_orport_reachability_check(options) ?
" Publishing server descriptor." : "");
- can_reach_dir_port = 1;
+ can_reach_dir_port = true;
if (router_should_advertise_dirport(options, me->dir_port)) {
mark_my_descriptor_dirty("DirPort found reachable");
/* This is a significant enough change to upload immediately,
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits