mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Put all NS_DECL invocations on single lines.
This is going to make my script happier; these lines will soon disappear.
This commit is contained in:
+2
-4
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
+1
-4
@@ -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>,
|
||||
|
||||
+11
-22
@@ -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);
|
||||
|
||||
|
||||
+5
-10
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user