mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Run "make autostyle" with new "annotate_ifdef_directives"
This commit is contained in:
parent
3283fd7e79
commit
194dbea24d
@ -1455,7 +1455,7 @@ options_act_reversible(const or_options_t *old_options, char **msg)
|
|||||||
"on this OS/with this build.");
|
"on this OS/with this build.");
|
||||||
goto rollback;
|
goto rollback;
|
||||||
}
|
}
|
||||||
#else /* !(!defined(HAVE_SYS_UN_H)) */
|
#else /* defined(HAVE_SYS_UN_H) */
|
||||||
if (options->ControlSocketsGroupWritable && !options->ControlSocket) {
|
if (options->ControlSocketsGroupWritable && !options->ControlSocket) {
|
||||||
*msg = tor_strdup("Setting ControlSocketGroupWritable without setting"
|
*msg = tor_strdup("Setting ControlSocketGroupWritable without setting"
|
||||||
"a ControlSocket makes no sense.");
|
"a ControlSocket makes no sense.");
|
||||||
@ -5101,7 +5101,7 @@ find_torrc_filename(config_line_t *cmd_arg,
|
|||||||
} else {
|
} else {
|
||||||
fname = dflt ? tor_strdup(dflt) : NULL;
|
fname = dflt ? tor_strdup(dflt) : NULL;
|
||||||
}
|
}
|
||||||
#else /* !(!defined(_WIN32)) */
|
#else /* defined(_WIN32) */
|
||||||
fname = dflt ? tor_strdup(dflt) : NULL;
|
fname = dflt ? tor_strdup(dflt) : NULL;
|
||||||
#endif /* !defined(_WIN32) */
|
#endif /* !defined(_WIN32) */
|
||||||
}
|
}
|
||||||
@ -8425,7 +8425,7 @@ init_cookie_authentication(const char *fname, const char *header,
|
|||||||
log_warn(LD_FS,"Unable to make %s group-readable.", escaped(fname));
|
log_warn(LD_FS,"Unable to make %s group-readable.", escaped(fname));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else /* !(!defined(_WIN32)) */
|
#else /* defined(_WIN32) */
|
||||||
(void) group_readable;
|
(void) group_readable;
|
||||||
#endif /* !defined(_WIN32) */
|
#endif /* !defined(_WIN32) */
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
((st) == SSL3_ST_SW_SRVR_HELLO_B))
|
((st) == SSL3_ST_SW_SRVR_HELLO_B))
|
||||||
#define OSSL_HANDSHAKE_STATE int
|
#define OSSL_HANDSHAKE_STATE int
|
||||||
#define CONST_IF_OPENSSL_1_1_API
|
#define CONST_IF_OPENSSL_1_1_API
|
||||||
#else /* !(!defined(OPENSSL_1_1_API)) */
|
#else /* defined(OPENSSL_1_1_API) */
|
||||||
#define STATE_IS_SW_SERVER_HELLO(st) \
|
#define STATE_IS_SW_SERVER_HELLO(st) \
|
||||||
((st) == TLS_ST_SW_SRVR_HELLO)
|
((st) == TLS_ST_SW_SRVR_HELLO)
|
||||||
#define CONST_IF_OPENSSL_1_1_API const
|
#define CONST_IF_OPENSSL_1_1_API const
|
||||||
|
@ -262,7 +262,7 @@ check_private_dir,(const char *dirname, cpd_check_t check,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
#else /* !(!defined(_WIN32)) */
|
#else /* defined(_WIN32) */
|
||||||
/* Win32 case: we can't open() a directory. */
|
/* Win32 case: we can't open() a directory. */
|
||||||
(void)effective_user;
|
(void)effective_user;
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
(void)(a); \
|
(void)(a); \
|
||||||
(void)(fmt); \
|
(void)(fmt); \
|
||||||
STMT_END
|
STMT_END
|
||||||
#else /* !(defined(TOR_UNIT_TESTS) && ... */
|
#else /* !(defined(TOR_UNIT_TESTS) && defined(DISABLE_ASSERTS_IN_UNIT_TES... */
|
||||||
/** Like assert(3), but send assertion failures to the log as well as to
|
/** Like assert(3), but send assertion failures to the log as well as to
|
||||||
* stderr. */
|
* stderr. */
|
||||||
#define tor_assert(expr) tor_assertf(expr, NULL)
|
#define tor_assert(expr) tor_assertf(expr, NULL)
|
||||||
|
@ -75,7 +75,7 @@ clamp_double_to_int64(double number)
|
|||||||
*/
|
*/
|
||||||
#define PROBLEMATIC_FLOAT_CONVERSION_WARNING
|
#define PROBLEMATIC_FLOAT_CONVERSION_WARNING
|
||||||
DISABLE_GCC_WARNING(float-conversion)
|
DISABLE_GCC_WARNING(float-conversion)
|
||||||
#endif /* defined(MINGW_ANY) && GCC_VERSION >= 409 */
|
#endif /* (defined(MINGW_ANY)||defined(__FreeBSD__)) && GCC_VERSION >= 409 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
With clang 4.0 we apparently run into "double promotion" warnings here,
|
With clang 4.0 we apparently run into "double promotion" warnings here,
|
||||||
|
@ -315,7 +315,7 @@ memarea_assert_ok(memarea_t *area)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* !(!defined(DISABLE_MEMORY_SENTINELS)) */
|
#else /* defined(DISABLE_MEMORY_SENTINELS) */
|
||||||
|
|
||||||
struct memarea_t {
|
struct memarea_t {
|
||||||
smartlist_t *pieces;
|
smartlist_t *pieces;
|
||||||
|
@ -165,7 +165,7 @@ finish_daemon(const char *desired_cwd)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else /* !(!defined(_WIN32)) */
|
#else /* defined(_WIN32) */
|
||||||
/* defined(_WIN32) */
|
/* defined(_WIN32) */
|
||||||
int
|
int
|
||||||
start_daemon(void)
|
start_daemon(void)
|
||||||
|
@ -513,7 +513,7 @@ process_get_unix_process(const process_t *process)
|
|||||||
tor_assert(process->unix_process);
|
tor_assert(process->unix_process);
|
||||||
return process->unix_process;
|
return process->unix_process;
|
||||||
}
|
}
|
||||||
#else /* !(!defined(_WIN32)) */
|
#else /* defined(_WIN32) */
|
||||||
/** Get the internal handle for Windows backend. */
|
/** Get the internal handle for Windows backend. */
|
||||||
process_win32_t *
|
process_win32_t *
|
||||||
process_get_win32_process(const process_t *process)
|
process_get_win32_process(const process_t *process)
|
||||||
|
@ -214,7 +214,7 @@ set_max_file_descriptors(rlim_t limit, int *max_out)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
limit = MAX_CONNECTIONS;
|
limit = MAX_CONNECTIONS;
|
||||||
#else /* !(!defined(HAVE_GETRLIMIT)) */
|
#else /* defined(HAVE_GETRLIMIT) */
|
||||||
struct rlimit rlim;
|
struct rlimit rlim;
|
||||||
|
|
||||||
if (getrlimit(RLIMIT_NOFILE, &rlim) != 0) {
|
if (getrlimit(RLIMIT_NOFILE, &rlim) != 0) {
|
||||||
|
@ -376,7 +376,7 @@ switch_id(const char *user, const unsigned flags)
|
|||||||
#endif /* defined(__linux__) && defined(HAVE_SYS_PRCTL_H) && ... */
|
#endif /* defined(__linux__) && defined(HAVE_SYS_PRCTL_H) && ... */
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
#else /* !(!defined(_WIN32)) */
|
#else /* defined(_WIN32) */
|
||||||
(void)user;
|
(void)user;
|
||||||
(void)flags;
|
(void)flags;
|
||||||
|
|
||||||
|
@ -657,7 +657,7 @@ tor_tls_context_new(crypto_pk_t *identity, unsigned int key_lifetime,
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
#else /* !(defined(SSL_CTX_set1_groups_list) || ...) */
|
#else /* !(defined(SSL_CTX_set1_groups_list) || defined(HAVE_SSL_CTX_SET1... */
|
||||||
if (! is_client) {
|
if (! is_client) {
|
||||||
int nid;
|
int nid;
|
||||||
EC_KEY *ec_key;
|
EC_KEY *ec_key;
|
||||||
@ -673,7 +673,7 @@ tor_tls_context_new(crypto_pk_t *identity, unsigned int key_lifetime,
|
|||||||
SSL_CTX_set_tmp_ecdh(result->ctx, ec_key);
|
SSL_CTX_set_tmp_ecdh(result->ctx, ec_key);
|
||||||
EC_KEY_free(ec_key);
|
EC_KEY_free(ec_key);
|
||||||
}
|
}
|
||||||
#endif /* defined(SSL_CTX_set1_groups_list) || ...) */
|
#endif /* defined(SSL_CTX_set1_groups_list) || defined(HAVE_SSL_CTX_SET1_... */
|
||||||
SSL_CTX_set_verify(result->ctx, SSL_VERIFY_PEER,
|
SSL_CTX_set_verify(result->ctx, SSL_VERIFY_PEER,
|
||||||
always_accept_verify_cb);
|
always_accept_verify_cb);
|
||||||
/* let us realloc bufs that we're writing from */
|
/* let us realloc bufs that we're writing from */
|
||||||
|
Loading…
Reference in New Issue
Block a user