diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-01-17 09:22:12 -0500 |
---|---|---|
committer | teor <teor@torproject.org> | 2020-01-20 15:48:45 +1000 |
commit | 152cbf2a5987128efc708f99b10cd6c8ad9862d8 (patch) | |
tree | 5e77f7ae8d979046b41742fa0664fdf1d58c505d | |
parent | c3633e6b295f9dbafd4c86795dfa79ed784c3bd2 (diff) | |
download | tor-152cbf2a5987128efc708f99b10cd6c8ad9862d8.tar.gz tor-152cbf2a5987128efc708f99b10cd6c8ad9862d8.zip |
Rename routerstatus_has_changed to routerstatus_has_visibly_changed
This is an automated commit, generated by this command:
./scripts/maint/rename_c_identifier.py \
routerstatus_has_changed routerstatus_has_visibly_changed
It was generated with --no-verify, since it introduces a wide line.
I'll fix it in a subsequent commit.
-rw-r--r-- | src/feature/nodelist/fmt_routerstatus.c | 2 | ||||
-rw-r--r-- | src/feature/nodelist/networkstatus.c | 4 | ||||
-rw-r--r-- | src/feature/nodelist/networkstatus.h | 2 | ||||
-rw-r--r-- | src/feature/nodelist/routerstatus_st.h | 2 | ||||
-rw-r--r-- | src/test/test_nodelist.c | 8 |
5 files changed, 9 insertions, 9 deletions
diff --git a/src/feature/nodelist/fmt_routerstatus.c b/src/feature/nodelist/fmt_routerstatus.c index dc44a6ef9c..2026d0c586 100644 --- a/src/feature/nodelist/fmt_routerstatus.c +++ b/src/feature/nodelist/fmt_routerstatus.c @@ -125,7 +125,7 @@ routerstatus_format_entry(const routerstatus_t *rs, const char *version, /* Blow up more or less nicely if we didn't get anything or not the * thing we expected. * This should be kept in sync with the function - * routerstatus_has_changed and the struct routerstatus_t + * routerstatus_has_visibly_changed and the struct routerstatus_t */ if (!desc) { char id[HEX_DIGEST_LEN+1]; diff --git a/src/feature/nodelist/networkstatus.c b/src/feature/nodelist/networkstatus.c index 208efcef66..03edfe62b1 100644 --- a/src/feature/nodelist/networkstatus.c +++ b/src/feature/nodelist/networkstatus.c @@ -1612,7 +1612,7 @@ networkstatus_consensus_has_ipv6(const or_options_t* options) * NS_CONTROL_PORT mode. **/ STATIC int -routerstatus_has_changed(const routerstatus_t *a, const routerstatus_t *b) +routerstatus_has_visibly_changed(const routerstatus_t *a, const routerstatus_t *b) { tor_assert(tor_memeq(a->identity_digest, b->identity_digest, DIGEST_LEN)); @@ -1670,7 +1670,7 @@ notify_control_networkstatus_changed(const networkstatus_t *old_c, tor_memcmp(rs_old->identity_digest, rs_new->identity_digest, DIGEST_LEN), smartlist_add(changed, (void*) rs_new)) { - if (routerstatus_has_changed(rs_old, rs_new)) + if (routerstatus_has_visibly_changed(rs_old, rs_new)) smartlist_add(changed, (void*)rs_new); } SMARTLIST_FOREACH_JOIN_END(rs_old, rs_new); diff --git a/src/feature/nodelist/networkstatus.h b/src/feature/nodelist/networkstatus.h index 7b63e30e9c..705bb12b8a 100644 --- a/src/feature/nodelist/networkstatus.h +++ b/src/feature/nodelist/networkstatus.h @@ -164,7 +164,7 @@ STATIC void warn_early_consensus(const networkstatus_t *c, const char *flavor, extern networkstatus_t *current_ns_consensus; extern networkstatus_t *current_md_consensus; #endif /* defined(TOR_UNIT_TESTS) */ -STATIC int routerstatus_has_changed(const routerstatus_t *a, +STATIC int routerstatus_has_visibly_changed(const routerstatus_t *a, const routerstatus_t *b); #endif /* defined(NETWORKSTATUS_PRIVATE) */ diff --git a/src/feature/nodelist/routerstatus_st.h b/src/feature/nodelist/routerstatus_st.h index eb6c3e5cfc..735c754b31 100644 --- a/src/feature/nodelist/routerstatus_st.h +++ b/src/feature/nodelist/routerstatus_st.h @@ -18,7 +18,7 @@ */ struct routerstatus_t { /* This should be kept in sync with the function - * routerstatus_has_changed and the printing function + * routerstatus_has_visibly_changed and the printing function * routerstatus_format_entry in NS_CONTROL_PORT mode. */ time_t published_on; /**< When was this router published? */ diff --git a/src/test/test_nodelist.c b/src/test/test_nodelist.c index d47cfc090b..c568e3698b 100644 --- a/src/test/test_nodelist.c +++ b/src/test/test_nodelist.c @@ -1282,21 +1282,21 @@ test_nodelist_routerstatus_has_changed(void *arg) STMT_END #define ASSERT_SAME() \ STMT_BEGIN \ - tt_assert(! routerstatus_has_changed(&rs_orig, &rs)); \ + tt_assert(! routerstatus_has_visibly_changed(&rs_orig, &rs)); \ FORMAT(); \ tt_str_op(fmt_orig, OP_EQ, fmt); \ COPY(); \ STMT_END #define ASSERT_CHANGED() \ STMT_BEGIN \ - tt_assert(routerstatus_has_changed(&rs_orig, &rs)); \ + tt_assert(routerstatus_has_visibly_changed(&rs_orig, &rs)); \ FORMAT(); \ tt_str_op(fmt_orig, OP_NE, fmt); \ COPY(); \ STMT_END #define ASSERT_CHANGED_NO_FORMAT() \ STMT_BEGIN \ - tt_assert(routerstatus_has_changed(&rs_orig, &rs)); \ + tt_assert(routerstatus_has_visibly_changed(&rs_orig, &rs)); \ COPY(); \ STMT_END @@ -1432,6 +1432,6 @@ struct testcase_t nodelist_tests[] = { NODE(routerstatus_describe, 0), NODE(extend_info_describe, 0), NODE(router_get_verbose_nickname, 0), - NODE(routerstatus_has_changed, 0), + NODE(routerstatus_has_visibly_changed, 0), END_OF_TESTCASES }; |