mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 13:43:47 +01:00
Re-run make autostyle.
This commit is contained in:
parent
b2d487ae22
commit
931a5db2a7
@ -191,7 +191,7 @@ static const char unix_q_socket_prefix[] = "unix:\"";
|
||||
{ #name "DownloadSchedule", #name "DownloadInitialDelay", 0, 1 }
|
||||
#else
|
||||
#define DOWNLOAD_SCHEDULE(name) { NULL, NULL, 0, 1 }
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
/** A list of abbreviations and aliases to map command-line options, obsolete
|
||||
* option names, or alternative option names, to their current values. */
|
||||
|
@ -1379,7 +1379,7 @@ CALLBACK(second_elapsed);
|
||||
#define CALLBACK(name, r, f) \
|
||||
PERIODIC_EVENT(name, PERIODIC_EVENT_ROLE_ ## r, f)
|
||||
#define FL(name) (PERIODIC_EVENT_FLAG_ ## name)
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
STATIC periodic_event_item_t mainloop_periodic_events[] = {
|
||||
|
||||
|
@ -131,7 +131,7 @@ STATIC smartlist_t *relay_padding_machines = NULL;
|
||||
if (!(circ)->padding_info[loop_var]) \
|
||||
continue;
|
||||
#define FOR_EACH_ACTIVE_CIRCUIT_MACHINE_END } STMT_END ;
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
/**
|
||||
* Free the machineinfo at an index
|
||||
|
@ -26,7 +26,7 @@
|
||||
PERIODIC_EVENT(name, \
|
||||
PERIODIC_EVENT_ROLE_##roles, \
|
||||
flags)
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
#define FL(name) (PERIODIC_EVENT_FLAG_ ## name)
|
||||
|
||||
|
@ -14,4 +14,4 @@
|
||||
|
||||
int proxy_mode(const or_options_t *options);
|
||||
|
||||
#endif
|
||||
#endif /* !defined(TOR_PROXYMODE_H) */
|
||||
|
@ -2281,7 +2281,7 @@ typedef struct control_cmd_def_t {
|
||||
0, \
|
||||
&obsolete_syntax, \
|
||||
}
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
/**
|
||||
* An array defining all the recognized controller commands.
|
||||
|
@ -1675,7 +1675,7 @@ control_event_status(int type, int severity, const char *format, va_list args)
|
||||
r = control_event_status((event), (sev), format, ap); \
|
||||
va_end(ap); \
|
||||
} while (0)
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
/** Format and send an EVENT_STATUS_GENERAL event whose main text is obtained
|
||||
* by formatting the arguments using the printf-style <b>format</b>. */
|
||||
|
@ -24,7 +24,7 @@
|
||||
PERIODIC_EVENT(name, \
|
||||
PERIODIC_EVENT_ROLE_##roles, \
|
||||
flags)
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
#define FL(name) (PERIODIC_EVENT_FLAG_##name)
|
||||
|
||||
|
@ -535,7 +535,7 @@ typedef struct router_id_iterator_t {
|
||||
* Initializer for a router_id_iterator_t.
|
||||
*/
|
||||
#define ROUTER_ID_ITERATOR_INIT { { NULL, 0 }, { NULL, 0 } }
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
/** Given an index *<b>idxp</b> into the consensus at <b>cons</b>, advance
|
||||
* the index to the next router line ("r ...") in the consensus, or to
|
||||
|
@ -26,4 +26,4 @@
|
||||
NO_ARGS, NEED_OBJ),\
|
||||
T01("dir-address", K_DIR_ADDRESS, GE(1), NO_OBJ)
|
||||
|
||||
#endif
|
||||
#endif /* !defined(TOR_AUTHCERT_MEMBERS_H) */
|
||||
|
@ -89,7 +89,7 @@
|
||||
(var = service->desc_next); \
|
||||
if (var == NULL) continue;
|
||||
#define FOR_EACH_DESCRIPTOR_END } STMT_END ;
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
/* Onion service directory file names. */
|
||||
static const char fname_keyfile_prefix[] = "hs_ed25519";
|
||||
|
@ -37,7 +37,7 @@
|
||||
PERIODIC_EVENT(name, \
|
||||
PERIODIC_EVENT_ROLE_##roles, \
|
||||
flags)
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
#define FL(name) (PERIODIC_EVENT_FLAG_##name)
|
||||
|
||||
|
@ -386,7 +386,7 @@ get_server_identity_key,(void))
|
||||
return server_identitykey;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* defined(HAVE_MODULE_RELAY) */
|
||||
|
||||
/** Return true iff we are a server and the server identity key
|
||||
* has been set. */
|
||||
|
@ -25,7 +25,7 @@ void set_server_advertised(int s);
|
||||
/** Is the relay module enabled? */
|
||||
#define have_module_relay() (1)
|
||||
|
||||
#else
|
||||
#else /* !defined(HAVE_MODULE_RELAY) */
|
||||
|
||||
#define dir_server_mode(options) (((void)(options)),0)
|
||||
#define server_mode(options) (((void)(options)),0)
|
||||
@ -37,6 +37,6 @@ void set_server_advertised(int s);
|
||||
|
||||
#define have_module_relay() (0)
|
||||
|
||||
#endif
|
||||
#endif /* defined(HAVE_MODULE_RELAY) */
|
||||
|
||||
#endif /* !defined(TOR_ROUTERMODE_H) */
|
||||
|
@ -110,7 +110,7 @@
|
||||
memset(a,0,SENTINEL_LEN); \
|
||||
} while (0)
|
||||
#endif /* defined(DISABLE_MEMORY_SENTINELS) */
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
/** Move all bytes stored in <b>chunk</b> to the front of <b>chunk</b>->mem,
|
||||
* to free up space at the end. */
|
||||
|
@ -21,7 +21,7 @@
|
||||
**/
|
||||
#define END_OF_CONFIG_VARS \
|
||||
{ .member = { .name = NULL } DUMMY_CONF_TEST_MEMBERS }
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
/**
|
||||
* Declare a config_var_t as a member named <b>membername</b> of the structure
|
||||
|
@ -72,8 +72,8 @@ typedef union {
|
||||
#define DUMMY_CONF_TEST_MEMBERS , .var_ptr_dummy={ .INT=NULL }
|
||||
#define DUMMY_TYPECHECK_INSTANCE(tp) \
|
||||
static tp tp ## _dummy
|
||||
#endif
|
||||
#endif
|
||||
#endif /* defined(TOR_UNIT_TESTS) */
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
#ifndef USE_CONF_TESTING
|
||||
#define CONF_TEST_MEMBERS(tp, conftype, member)
|
||||
@ -82,6 +82,6 @@ typedef union {
|
||||
struct tor_semicolon_eater
|
||||
#define DUMMY_CONF_TEST_MEMBERS
|
||||
|
||||
#endif /* defined(TOR_UNIT_TESTS) */
|
||||
#endif /* !defined(USE_CONF_TESTING) */
|
||||
|
||||
#endif /* !defined(TOR_LIB_CONF_CONFTESTING_H) */
|
||||
|
@ -166,6 +166,6 @@ char *smartlist_join_strings2(smartlist_t *sl, const char *join,
|
||||
#define SMARTLIST_FOREACH_JOIN_END(var1, var2) \
|
||||
} \
|
||||
STMT_END
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
#endif /* !defined(TOR_SMARTLIST_H) */
|
||||
|
@ -126,7 +126,7 @@ crypto_openssl_get_header_version_str(void)
|
||||
#error "OpenSSL has been built without thread support. Tor requires an \
|
||||
OpenSSL library with thread support enabled."
|
||||
#endif
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
#ifndef NEW_THREAD_API
|
||||
/** Helper: OpenSSL uses this callback to manipulate mutexes. */
|
||||
|
@ -57,7 +57,7 @@ dispatch_naming_init(void)
|
||||
return namemap_get_size(&type##_id_map); \
|
||||
} \
|
||||
EAT_SEMICOLON
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
DECLARE_ID_MAP_FNS(message);
|
||||
DECLARE_ID_MAP_FNS(channel);
|
||||
|
@ -64,7 +64,7 @@ struct timeout_cb {
|
||||
#else
|
||||
/* We're not exposing any of the functions outside this file. */
|
||||
#define TIMEOUT_PUBLIC static
|
||||
#endif /* defined(__GNUC__) */
|
||||
#endif /* defined(COCCI) || ... */
|
||||
/* We're not using periodic events. */
|
||||
#define TIMEOUT_DISABLE_INTERVALS
|
||||
/* We always know the global_timeouts object, so we don't need each timeout
|
||||
|
@ -27,8 +27,8 @@
|
||||
#error "Your syslog.h thinks high numbers are more important. " \
|
||||
"We aren't prepared to deal with that."
|
||||
#endif
|
||||
#endif
|
||||
#else /* !(defined(HAVE_SYSLOG_H)) */
|
||||
#endif /* LOG_DEBUG < LOG_ERR */
|
||||
#else /* !defined(HAVE_SYSLOG_H) */
|
||||
/* Note: Syslog's logging code refers to priorities, with 0 being the most
|
||||
* important. Thus, all our comparisons needed to be reversed when we added
|
||||
* syslog support.
|
||||
@ -310,7 +310,7 @@ MOCK_DECL(STATIC void, logv, (int severity, log_domain_mask_t domain,
|
||||
va_list ap) CHECK_PRINTF(5,0));
|
||||
MOCK_DECL(STATIC void, add_stream_log_impl,(
|
||||
const log_severity_list_t *severity, const char *name, int fd));
|
||||
#endif
|
||||
#endif /* defined(LOG_PRIVATE) */
|
||||
|
||||
#if defined(LOG_PRIVATE) || defined(TOR_UNIT_TESTS)
|
||||
/** Given a severity, yields an index into log_severity_list_t.masks to use
|
||||
|
@ -225,7 +225,7 @@
|
||||
1)) \
|
||||
: 0)
|
||||
#endif /* defined(__GNUC__) */
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
#define IF_BUG_ONCE_VARNAME_(a) \
|
||||
warning_logged_on_ ## a ## __
|
||||
|
@ -109,7 +109,7 @@ typedef struct atomic_counter_t {
|
||||
#ifndef COCCI
|
||||
#define ATOMIC_LINKAGE static
|
||||
#endif
|
||||
#else /* !(defined(HAVE_WORKING_STDATOMIC)) */
|
||||
#else /* !defined(HAVE_WORKING_STDATOMIC) */
|
||||
typedef struct atomic_counter_t {
|
||||
tor_mutex_t mutex;
|
||||
size_t val;
|
||||
|
@ -24,5 +24,5 @@ const char tor_bug_suffix[] = " (on Tor " VERSION
|
||||
" "
|
||||
#include "micro-revision.i"
|
||||
#endif
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
")";
|
||||
|
@ -83,6 +83,6 @@
|
||||
((tv1)->tv_usec op (tv2)->tv_usec) : \
|
||||
((tv1)->tv_sec op (tv2)->tv_sec))
|
||||
#endif /* !defined(timercmp) */
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
#endif /* !defined(TOR_TIMEVAL_H) */
|
||||
|
@ -65,7 +65,7 @@
|
||||
tt_assert_test_fmt_type(a,b,#a" "#op" "#b,int64_t,(val1_ op val2_), \
|
||||
int64_t, "%"PRId64, \
|
||||
{print_ = (int64_t) value_;}, {}, TT_EXIT_TEST_FUNCTION)
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
/**
|
||||
* Declare that the test is done, even though no tt___op() calls were made.
|
||||
@ -164,7 +164,7 @@ void free_pregenerated_keys(void);
|
||||
NULL, \
|
||||
NULL, \
|
||||
}
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
#define NS(name) US_CONCAT_3_(NS_MODULE, NS_SUBMODULE, name)
|
||||
#define NS_FULL(module, submodule, name) US_CONCAT_3_(module, submodule, name)
|
||||
@ -175,7 +175,7 @@ void free_pregenerated_keys(void);
|
||||
extern int CALLED(mock_fn); \
|
||||
static retval NS(mock_fn) args; int CALLED(mock_fn) = 0
|
||||
#define NS_MOCK(name) MOCK(name, NS(name))
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
#define NS_UNMOCK(name) UNMOCK(name)
|
||||
|
||||
extern const struct testcase_setup_t passthrough_setup;
|
||||
|
@ -70,7 +70,7 @@ test_addr_basic(void *arg)
|
||||
TT_EXIT_TEST_FUNCTION \
|
||||
); \
|
||||
STMT_END
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
/** Helper: Assert that two strings both decode as IPv6 addresses with
|
||||
* tor_inet_pton(), and both decode to the same address. */
|
||||
@ -138,7 +138,7 @@ test_addr_basic(void *arg)
|
||||
TT_DIE(("Failed: tor_addr_compare_masked(%s,%s,%d) %s 0", \
|
||||
a, b, m, #op)); \
|
||||
STMT_END
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
/** Helper: assert that <b>xx</b> is parseable as a masked IPv6 address with
|
||||
* ports by tor_parse_mask_addr_ports(), with family <b>f</b>, IP address
|
||||
|
@ -1044,7 +1044,7 @@ test_confparse_find_option_name(void *arg)
|
||||
#define BADVAL_TEST(name) \
|
||||
{ "badval_" #name, test_confparse_assign_badval, 0, \
|
||||
&passthrough_setup, (void*)&bv_ ## name }
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
struct testcase_t confparse_tests[] = {
|
||||
CONFPARSE_TEST(init, 0),
|
||||
|
@ -888,7 +888,7 @@ test_failed_orconn_tracker(void *arg)
|
||||
/* where arg is an expression (constant, variable, compound expression) */
|
||||
#define CONNECTION_TESTCASE_ARG(name, fork, setup, arg) \
|
||||
{ #name "_" #arg, test_conn_##name, fork, &setup, (void *)arg }
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
struct testcase_t connection_tests[] = {
|
||||
CONNECTION_TESTCASE(get_basic, TT_FORK, test_conn_get_basic_st),
|
||||
|
@ -130,7 +130,7 @@ test_controller_parse_cmd(void *arg)
|
||||
{ &syntax, \
|
||||
ARRAY_LENGTH(array), \
|
||||
array }
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
static const parser_testcase_t one_to_three_tests[] = {
|
||||
ERR("", "Need at least 1 argument(s)"),
|
||||
|
@ -2982,7 +2982,7 @@ test_crypto_failure_modes(void *arg)
|
||||
#define ED25519_TEST(name, fl) \
|
||||
ED25519_TEST_ONE(name, (fl), "donna"), \
|
||||
ED25519_TEST_ONE(name, (fl), "ref10")
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
struct testcase_t crypto_tests[] = {
|
||||
CRYPTO_LEGACY(formats),
|
||||
|
@ -595,7 +595,7 @@ test_crypto_ed25519_fuzz_donna(void *arg)
|
||||
#define ED25519_TEST(name, fl) \
|
||||
ED25519_TEST_ONE(name, (fl), "donna"), \
|
||||
ED25519_TEST_ONE(name, (fl), "ref10")
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
struct testcase_t slow_crypto_tests[] = {
|
||||
CRYPTO_LEGACY(s2k_rfc2440),
|
||||
|
@ -7220,7 +7220,7 @@ test_dir_format_versions_list(void *arg)
|
||||
/* where arg is a string constant */
|
||||
#define DIR_ARG(name,flags,arg) \
|
||||
{ #name "_" arg, test_dir_##name, (flags), &passthrough_setup, (void*) arg }
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
struct testcase_t dir_tests[] = {
|
||||
DIR_LEGACY(nicknames),
|
||||
|
@ -3062,7 +3062,7 @@ static const struct testcase_setup_t upgrade_circuits = {
|
||||
&upgrade_circuits, (void*)(arg REASONABLY_FUTURE) }, \
|
||||
{ #name "_reasonably_past", test_entry_guard_ ## name, TT_FORK, \
|
||||
&upgrade_circuits, (void*)(arg REASONABLY_PAST) }
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
struct testcase_t entrynodes_tests[] = {
|
||||
NO_PREFIX_TEST(node_preferred_orport),
|
||||
|
@ -1528,7 +1528,7 @@ AUTHENTICATE_FAIL(missing_ed_auth,
|
||||
#define TEST_AUTHENTICATE_ED(name) \
|
||||
{ "authenticate/" #name "_ed25519" , test_link_handshake_auth_ ## name, \
|
||||
TT_FORK, &setup_authenticate, (void*)3 }
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
struct testcase_t link_handshake_tests[] = {
|
||||
TEST_RSA(certs_ok, TT_FORK),
|
||||
|
@ -696,7 +696,7 @@ test_options_validate__logs(void *ignored)
|
||||
tt_int_op(ret, OP_EQ, -1);
|
||||
#else
|
||||
tt_int_op(ret, OP_EQ, 0);
|
||||
#endif
|
||||
#endif /* defined(_WIN32) */
|
||||
|
||||
free_options_test_data(tdata);
|
||||
tdata = get_options_test_data("");
|
||||
|
@ -317,7 +317,7 @@ test_util_write_chunks_to_file(void *arg)
|
||||
_TFE(a, b, tm_min ); \
|
||||
_TFE(a, b, tm_sec ); \
|
||||
TT_STMT_END
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
static void
|
||||
test_util_time(void *arg)
|
||||
@ -6284,7 +6284,7 @@ test_util_map_anon_nofork(void *arg)
|
||||
{ "compress_dos/" #name, test_util_decompress_dos, 0, \
|
||||
&compress_setup, \
|
||||
(char*)(identifier) }
|
||||
#endif
|
||||
#endif /* !defined(COCCI) */
|
||||
|
||||
#ifdef _WIN32
|
||||
#define UTIL_TEST_NO_WIN(n, f) { #n, NULL, TT_SKIP, NULL, NULL }
|
||||
|
Loading…
Reference in New Issue
Block a user