Fix check-spaces complaints

This commit is contained in:
Nick Mathewson 2015-10-02 13:22:00 +02:00
parent 3b09322c9b
commit 0e03a0421e
4 changed files with 8 additions and 5 deletions

View File

@ -85,7 +85,8 @@ smartlist_ensure_capacity(smartlist_t *sl, int size)
} }
sl->list = tor_reallocarray(sl->list, sizeof(void *), sl->list = tor_reallocarray(sl->list, sizeof(void *),
((size_t)higher)); ((size_t)higher));
memset(sl->list + sl->capacity, 0, sizeof(void *) * (higher - sl->capacity)); memset(sl->list + sl->capacity, 0,
sizeof(void *) * (higher - sl->capacity));
sl->capacity = higher; sl->capacity = higher;
} }
#undef ASSERT_CAPACITY #undef ASSERT_CAPACITY

View File

@ -1102,7 +1102,8 @@ add_file_log(const log_severity_list_t *severity, const char *filename,
* Tor-<syslog_identity_tag> if that is not NULL. * Tor-<syslog_identity_tag> if that is not NULL.
*/ */
int int
add_syslog_log(const log_severity_list_t *severity, const char* syslog_identity_tag) add_syslog_log(const log_severity_list_t *severity,
const char* syslog_identity_tag)
{ {
logfile_t *lf; logfile_t *lf;
if (syslog_count++ == 0) { if (syslog_count++ == 0) {

View File

@ -135,7 +135,8 @@ void add_stream_log(const log_severity_list_t *severity, const char *name,
int add_file_log(const log_severity_list_t *severity, const char *filename, int add_file_log(const log_severity_list_t *severity, const char *filename,
const int truncate); const int truncate);
#ifdef HAVE_SYSLOG_H #ifdef HAVE_SYSLOG_H
int add_syslog_log(const log_severity_list_t *severity, const char* syslog_identity_tag); int add_syslog_log(const log_severity_list_t *severity,
const char* syslog_identity_tag);
#endif #endif
int add_callback_log(const log_severity_list_t *severity, log_callback cb); int add_callback_log(const log_severity_list_t *severity, log_callback cb);
void logs_set_domain_logging(int enabled); void logs_set_domain_logging(int enabled);

View File

@ -836,7 +836,7 @@ test_address_get_if_addrs_internal_fail(void *arg)
rv = get_interface_address(LOG_ERR, &ipv4h_addr); rv = get_interface_address(LOG_ERR, &ipv4h_addr);
tt_assert(rv == -1); tt_assert(rv == -1);
done: done:
UNMOCK(get_interface_addresses_raw); UNMOCK(get_interface_addresses_raw);
UNMOCK(get_interface_address6_via_udp_socket_hack); UNMOCK(get_interface_address6_via_udp_socket_hack);
free_interface_address6_list(results1); free_interface_address6_list(results1);
@ -864,7 +864,7 @@ test_address_get_if_addrs_no_internal_fail(void *arg)
tt_assert(results2 != NULL); tt_assert(results2 != NULL);
tt_int_op(smartlist_len(results2),==,0); tt_int_op(smartlist_len(results2),==,0);
done: done:
UNMOCK(get_interface_addresses_raw); UNMOCK(get_interface_addresses_raw);
UNMOCK(get_interface_address6_via_udp_socket_hack); UNMOCK(get_interface_address6_via_udp_socket_hack);
free_interface_address6_list(results1); free_interface_address6_list(results1);