diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-01-09 10:06:35 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-01-09 10:06:35 -0500 |
commit | e2fcfc6e52e5e95a43df12259055fa38e9a9c06d (patch) | |
tree | b15ba54c6098db33d47bbc33c000bc67ee79fb0f | |
parent | 1ffba2f1217e5025dd2e6fe783517a22e225c63b (diff) | |
download | tor-e2fcfc6e52e5e95a43df12259055fa38e9a9c06d.tar.gz tor-e2fcfc6e52e5e95a43df12259055fa38e9a9c06d.zip |
Put all NS_DECL invocations on single lines.
This is going to make my script happier; these lines will soon
disappear.
-rw-r--r-- | src/test/test_dir.c | 6 | ||||
-rw-r--r-- | src/test/test_dir_handle_get.c | 6 | ||||
-rw-r--r-- | src/test/test_dns.c | 5 | ||||
-rw-r--r-- | src/test/test_routerset.c | 33 | ||||
-rw-r--r-- | src/test/test_status.c | 15 |
5 files changed, 21 insertions, 44 deletions
diff --git a/src/test/test_dir.c b/src/test/test_dir.c index 7065012cf1..88a099695a 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -5473,8 +5473,7 @@ test_dir_conn_purpose_to_string(void *data) teardown_capture_of_logs(); } -NS_DECL(int, -public_server_mode, (const or_options_t *options)); +NS_DECL(int, public_server_mode, (const or_options_t *options)); static int NS(public_server_mode)(const or_options_t *options) @@ -5542,8 +5541,7 @@ test_dir_should_use_directory_guards(void *data) tor_free(errmsg); } -NS_DECL(void, -directory_initiate_request, (directory_request_t *req)); +NS_DECL(void, directory_initiate_request, (directory_request_t *req)); static void test_dir_should_not_init_request_to_ourselves(void *data) diff --git a/src/test/test_dir_handle_get.c b/src/test/test_dir_handle_get.c index cf8711272b..2c6ad14398 100644 --- a/src/test/test_dir_handle_get.c +++ b/src/test/test_dir_handle_get.c @@ -2249,8 +2249,7 @@ test_dir_handle_get_status_vote_next_bandwidth_not_found(void* data) tor_free(header); } -NS_DECL(const char*, -dirvote_get_pending_consensus, (consensus_flavor_t flav)); +NS_DECL(const char*, dirvote_get_pending_consensus, (consensus_flavor_t flav)); const char* NS(dirvote_get_pending_consensus)(consensus_flavor_t flav) @@ -2348,8 +2347,7 @@ test_dir_handle_get_status_vote_next_consensus_signatures_not_found(void* data) tor_free(body); } -NS_DECL(const char*, -dirvote_get_pending_detached_signatures, (void)); +NS_DECL(const char*, dirvote_get_pending_detached_signatures, (void)); const char* NS(dirvote_get_pending_detached_signatures)(void) diff --git a/src/test/test_dns.c b/src/test/test_dns.c index 458bf37b05..1b6d01e480 100644 --- a/src/test/test_dns.c +++ b/src/test/test_dns.c @@ -107,10 +107,7 @@ static cached_resolve_t *cache_entry_mock = NULL; static int n_fake_impl = 0; -NS_DECL(int, dns_resolve_impl, (edge_connection_t *exitconn, int is_resolve, - or_circuit_t *oncirc, char **hostname_out, - int *made_connection_pending_out, - cached_resolve_t **resolve_out)); +NS_DECL(int, dns_resolve_impl, (edge_connection_t *exitconn, int is_resolve, or_circuit_t *oncirc, char **hostname_out, int *made_connection_pending_out, cached_resolve_t **resolve_out)); /** This will be our configurable substitute for <b>dns_resolve_impl</b> in * dns.c. It will return <b>resolve_retval</b>, diff --git a/src/test/test_routerset.c b/src/test/test_routerset.c index 3c69f212b4..e98b4110b2 100644 --- a/src/test/test_routerset.c +++ b/src/test/test_routerset.c @@ -439,8 +439,7 @@ NS(test_main)(void *arg) * Structural test for routerset_parse, when given a valid wildcard policy. */ -NS_DECL(addr_policy_t *, router_parse_addr_policy_item_from_string, - (const char *s, int assume_action, int *malformed_list)); +NS_DECL(addr_policy_t *, router_parse_addr_policy_item_from_string, (const char *s, int assume_action, int *malformed_list)); static addr_policy_t *NS(mock_addr_policy); @@ -487,8 +486,7 @@ NS(router_parse_addr_policy_item_from_string)(const char *s, * literal policy. */ -NS_DECL(addr_policy_t *, router_parse_addr_policy_item_from_string, - (const char *s, int assume_action, int *bogus)); +NS_DECL(addr_policy_t *, router_parse_addr_policy_item_from_string, (const char *s, int assume_action, int *bogus)); static addr_policy_t *NS(mock_addr_policy); @@ -534,8 +532,7 @@ NS(router_parse_addr_policy_item_from_string)(const char *s, int assume_action, * literal policy. */ -NS_DECL(addr_policy_t *, router_parse_addr_policy_item_from_string, - (const char *s, int assume_action, int *bad)); +NS_DECL(addr_policy_t *, router_parse_addr_policy_item_from_string, (const char *s, int assume_action, int *bad)); static addr_policy_t *NS(mock_addr_policy); @@ -953,8 +950,7 @@ NS(test_main)(void *arg) * and the address is rejected by policy. */ -NS_DECL(addr_policy_result_t, compare_tor_addr_to_addr_policy, - (const tor_addr_t *addr, uint16_t port, const smartlist_t *policy)); +NS_DECL(addr_policy_result_t, compare_tor_addr_to_addr_policy, (const tor_addr_t *addr, uint16_t port, const smartlist_t *policy)); static tor_addr_t MOCK_TOR_ADDR; #define MOCK_TOR_ADDR_PTR (&MOCK_TOR_ADDR) @@ -1001,8 +997,7 @@ NS(compare_tor_addr_to_addr_policy)(const tor_addr_t *addr, uint16_t port, * and the address is not rejected by policy. */ -NS_DECL(addr_policy_result_t, compare_tor_addr_to_addr_policy, - (const tor_addr_t *addr, uint16_t port, const smartlist_t *policy)); +NS_DECL(addr_policy_result_t, compare_tor_addr_to_addr_policy, (const tor_addr_t *addr, uint16_t port, const smartlist_t *policy)); static void NS(test_main)(void *arg) @@ -1047,8 +1042,7 @@ NS(compare_tor_addr_to_addr_policy)(const tor_addr_t *addr, uint16_t port, * and the address is NULL. */ -NS_DECL(addr_policy_result_t, compare_tor_addr_to_addr_policy, - (const tor_addr_t *addr, uint16_t port, const smartlist_t *policy)); +NS_DECL(addr_policy_result_t, compare_tor_addr_to_addr_policy, (const tor_addr_t *addr, uint16_t port, const smartlist_t *policy)); static void NS(test_main)(void *arg) @@ -1091,8 +1085,7 @@ NS(compare_tor_addr_to_addr_policy)(const tor_addr_t *addr, uint16_t port, * for the address. */ -NS_DECL(addr_policy_result_t, compare_tor_addr_to_addr_policy, - (const tor_addr_t *addr, uint16_t port, const smartlist_t *policy)); +NS_DECL(addr_policy_result_t, compare_tor_addr_to_addr_policy, (const tor_addr_t *addr, uint16_t port, const smartlist_t *policy)); NS_DECL(int, geoip_get_country_by_addr, (const tor_addr_t *addr)); static void @@ -1149,8 +1142,7 @@ NS(geoip_get_country_by_addr)(const tor_addr_t *addr) * for the address. */ -NS_DECL(addr_policy_result_t, compare_tor_addr_to_addr_policy, - (const tor_addr_t *addr, uint16_t port, const smartlist_t *policy)); +NS_DECL(addr_policy_result_t, compare_tor_addr_to_addr_policy, (const tor_addr_t *addr, uint16_t port, const smartlist_t *policy)); NS_DECL(int, geoip_get_country_by_addr, (const tor_addr_t *addr)); static void @@ -1614,8 +1606,7 @@ NS(test_main)(void *arg) * is empty. */ -NS_DECL(const node_t *, node_get_by_nickname, - (const char *nickname, unsigned flags)); +NS_DECL(const node_t *, node_get_by_nickname, (const char *nickname, unsigned flags)); static const char *NS(mock_nickname); static void @@ -1663,8 +1654,7 @@ NS(node_get_by_nickname)(const char *nickname, unsigned flags) * is set but the nodes are not running. */ -NS_DECL(const node_t *, node_get_by_nickname, - (const char *nickname, unsigned flags)); +NS_DECL(const node_t *, node_get_by_nickname, (const char *nickname, unsigned flags)); static const char *NS(mock_nickname); static node_t NS(mock_node); @@ -1713,8 +1703,7 @@ NS(node_get_by_nickname)(const char *nickname, unsigned flags) * Structural test for routerset_get_all_nodes. */ -NS_DECL(const node_t *, node_get_by_nickname, - (const char *nickname, unsigned flags)); +NS_DECL(const node_t *, node_get_by_nickname, (const char *nickname, unsigned flags)); static char *NS(mock_nickname); static node_t NS(mock_node); diff --git a/src/test/test_status.c b/src/test/test_status.c index 4edd7ec518..6a4d9ece46 100644 --- a/src/test/test_status.c +++ b/src/test/test_status.c @@ -317,8 +317,7 @@ NS_DECL(int, we_are_hibernating, (void)); NS_DECL(int, public_server_mode, (const or_options_t *options)); NS_DECL(const routerinfo_t *, router_get_my_routerinfo, (void)); NS_DECL(const node_t *, node_get_by_id, (const char *identity_digest)); -NS_DECL(void, logv, (int severity, log_domain_mask_t domain, - const char *funcname, const char *suffix, const char *format, va_list ap)); +NS_DECL(void, logv, (int severity, log_domain_mask_t domain, const char *funcname, const char *suffix, const char *format, va_list ap)); NS_DECL(int, server_mode, (const or_options_t *options)); static routerinfo_t *mock_routerinfo; @@ -488,8 +487,7 @@ NS_DECL(int, public_server_mode, (const or_options_t *options)); NS_DECL(long, get_uptime, (void)); NS_DECL(uint64_t, get_bytes_read, (void)); NS_DECL(uint64_t, get_bytes_written, (void)); -NS_DECL(void, logv, (int severity, log_domain_mask_t domain, - const char *funcname, const char *suffix, const char *format, va_list ap)); +NS_DECL(void, logv, (int severity, log_domain_mask_t domain, const char *funcname, const char *suffix, const char *format, va_list ap)); NS_DECL(int, server_mode, (const or_options_t *options)); static int NS(n_msgs) = 0; @@ -613,8 +611,7 @@ NS_DECL(int, public_server_mode, (const or_options_t *options)); NS_DECL(long, get_uptime, (void)); NS_DECL(uint64_t, get_bytes_read, (void)); NS_DECL(uint64_t, get_bytes_written, (void)); -NS_DECL(void, logv, (int severity, log_domain_mask_t domain, - const char *funcname, const char *suffix, const char *format, va_list ap)); +NS_DECL(void, logv, (int severity, log_domain_mask_t domain, const char *funcname, const char *suffix, const char *format, va_list ap)); NS_DECL(int, server_mode, (const or_options_t *options)); NS_DECL(or_state_t *, get_or_state, (void)); NS_DECL(int, accounting_is_enabled, (const or_options_t *options)); @@ -800,8 +797,7 @@ NS_DECL(int, public_server_mode, (const or_options_t *options)); NS_DECL(long, get_uptime, (void)); NS_DECL(uint64_t, get_bytes_read, (void)); NS_DECL(uint64_t, get_bytes_written, (void)); -NS_DECL(void, logv, (int severity, log_domain_mask_t domain, - const char *funcname, const char *suffix, const char *format, va_list ap)); +NS_DECL(void, logv, (int severity, log_domain_mask_t domain, const char *funcname, const char *suffix, const char *format, va_list ap)); NS_DECL(int, server_mode, (const or_options_t *options)); NS_DECL(int, accounting_is_enabled, (const or_options_t *options)); @@ -952,8 +948,7 @@ NS_DECL(int, public_server_mode, (const or_options_t *options)); NS_DECL(long, get_uptime, (void)); NS_DECL(uint64_t, get_bytes_read, (void)); NS_DECL(uint64_t, get_bytes_written, (void)); -NS_DECL(void, logv, (int severity, log_domain_mask_t domain, - const char *funcname, const char *suffix, const char *format, va_list ap)); +NS_DECL(void, logv, (int severity, log_domain_mask_t domain, const char *funcname, const char *suffix, const char *format, va_list ap)); NS_DECL(int, server_mode, (const or_options_t *options)); NS_DECL(int, accounting_is_enabled, (const or_options_t *options)); |