mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Reduce make check-spaces noise
This commit is contained in:
parent
1e330e1947
commit
9eeaeddbb1
@ -271,3 +271,4 @@ select_array_member_cumulative_timei(const uint64_t *entries, int n_entries,
|
||||
|
||||
return i_chosen;
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,8 @@ void dimap_add_entry(di_digest256_map_t **map,
|
||||
const uint8_t *key, void *val);
|
||||
void *dimap_search(const di_digest256_map_t *map, const uint8_t *key,
|
||||
void *dflt_val);
|
||||
int select_array_member_cumulative_timei(const uint64_t *entries, int n_entries,
|
||||
int select_array_member_cumulative_timei(const uint64_t *entries,
|
||||
int n_entries,
|
||||
uint64_t total, uint64_t rand_val);
|
||||
|
||||
#endif
|
||||
|
@ -21,7 +21,9 @@
|
||||
* unsigned priority);
|
||||
* int T_unsubscribe(const T_subscriber_t *)
|
||||
*
|
||||
* Elsewhere you can say DECLARE_NOTIFY_PUBSUB_TOPIC(static, T), which declares:
|
||||
* Elsewhere you can say DECLARE_NOTIFY_PUBSUB_TOPIC(static, T), which
|
||||
* declares:
|
||||
*
|
||||
* static int T_notify(T_event_data_t *, unsigned notify_flags);
|
||||
* static void T_clear(void);
|
||||
*
|
||||
|
@ -104,14 +104,14 @@
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define IF_BUG_ONCE__(cond,var) \
|
||||
if (({ \
|
||||
if (( { \
|
||||
static int var = 0; \
|
||||
int bool_result = (cond); \
|
||||
if (PREDICT_UNLIKELY(bool_result) && !var) { \
|
||||
var = 1; \
|
||||
tor_bug_occurred_(SHORT_FILE__, __LINE__, __func__, #cond, 1); \
|
||||
} \
|
||||
PREDICT_UNLIKELY(bool_result); }))
|
||||
PREDICT_UNLIKELY(bool_result); } ))
|
||||
#else
|
||||
#define IF_BUG_ONCE__(cond,var) \
|
||||
static int var = 0; \
|
||||
|
@ -1703,7 +1703,8 @@ connection_ap_handshake_rewrite_and_attach(entry_connection_t *conn,
|
||||
/* Fill in the rend_data field so we can start doing a connection to
|
||||
* a hidden service. */
|
||||
rend_data_t *rend_data = ENTRY_TO_EDGE_CONN(conn)->rend_data =
|
||||
rend_data_client_create(socks->address, NULL, (char *) cookie, auth_type);
|
||||
rend_data_client_create(socks->address, NULL, (char *) cookie,
|
||||
auth_type);
|
||||
if (rend_data == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -1067,4 +1067,3 @@ rend_auth_decode_cookie(const char *cookie_in, uint8_t *cookie_out,
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
@ -221,7 +221,8 @@ int hex_digest_nickname_matches(const char *hexdigest,
|
||||
STATIC int choose_array_element_by_weight(const uint64_t *entries,
|
||||
int n_entries);
|
||||
STATIC void scale_array_elements_to_u64(uint64_t *entries_out,
|
||||
const double *entries_in, int n_entries,
|
||||
const double *entries_in,
|
||||
int n_entries,
|
||||
uint64_t *total_out);
|
||||
STATIC const routerstatus_t *router_pick_directory_server_impl(
|
||||
dirinfo_type_t auth, int flags,
|
||||
|
@ -23,10 +23,10 @@
|
||||
#define MAX_DURATION 30
|
||||
#define N_DISABLE 5
|
||||
|
||||
static struct timeval fire_at[N_TIMERS] = {{0,0}};
|
||||
static struct timeval fire_at[N_TIMERS] = { {0,0} };
|
||||
static int is_disabled[N_TIMERS] = {0};
|
||||
static int fired[N_TIMERS] = {0};
|
||||
static struct timeval difference[N_TIMERS] = {{0,0}};
|
||||
static struct timeval difference[N_TIMERS] = { {0,0} };
|
||||
static tor_timer_t *timers[N_TIMERS] = {NULL};
|
||||
|
||||
static int n_active_timers = 0;
|
||||
@ -131,3 +131,4 @@ main(int argc, char **argv)
|
||||
timers_shutdown();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -542,7 +542,8 @@ test_crypto_aes_ctr_testvec(void *arg)
|
||||
char plaintext[16*4];
|
||||
base16_decode(key, sizeof(key), key16, strlen(key16));
|
||||
base16_decode(iv, sizeof(iv), ctr16, strlen(ctr16));
|
||||
base16_decode(plaintext, sizeof(plaintext), plaintext16, strlen(plaintext16));
|
||||
base16_decode(plaintext, sizeof(plaintext),
|
||||
plaintext16, strlen(plaintext16));
|
||||
|
||||
crypto_cipher_t *c = crypto_cipher_new_with_iv(key, iv);
|
||||
crypto_cipher_crypt_inplace(c, plaintext, sizeof(plaintext));
|
||||
@ -1396,9 +1397,11 @@ test_crypto_digest_names(void *arg)
|
||||
int i;
|
||||
for (i = 0; names[i].n; ++i) {
|
||||
tt_str_op(names[i].n, OP_EQ,crypto_digest_algorithm_get_name(names[i].a));
|
||||
tt_int_op(names[i].a, OP_EQ,crypto_digest_algorithm_parse_name(names[i].n));
|
||||
tt_int_op(names[i].a,
|
||||
OP_EQ,crypto_digest_algorithm_parse_name(names[i].n));
|
||||
}
|
||||
tt_int_op(-1, OP_EQ, crypto_digest_algorithm_parse_name("TimeCubeHash-4444"));
|
||||
tt_int_op(-1, OP_EQ,
|
||||
crypto_digest_algorithm_parse_name("TimeCubeHash-4444"));
|
||||
done:
|
||||
;
|
||||
}
|
||||
@ -1887,7 +1890,6 @@ test_crypto_hkdf_sha256_testvecs(void *arg)
|
||||
tor_free(mem_op_hex_tmp);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
test_crypto_curve25519_impl(void *arg)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user