diff options
| -rw-r--r-- | ot_accesslist.c | 4 | ||||
| -rw-r--r-- | ot_accesslist.h | 2 | ||||
| -rw-r--r-- | ot_fullscrape.c | 4 | ||||
| -rw-r--r-- | ot_fullscrape.h | 4 | ||||
| -rw-r--r-- | ot_mutex.c | 6 | ||||
| -rw-r--r-- | ot_stats.c | 6 | ||||
| -rw-r--r-- | ot_udp.c | 2 | ||||
| -rw-r--r-- | trackerlogic.c | 2 |
8 files changed, 15 insertions, 15 deletions
diff --git a/ot_accesslist.c b/ot_accesslist.c index 253fe95..f1bb885 100644 --- a/ot_accesslist.c +++ b/ot_accesslist.c | |||
| @@ -342,7 +342,7 @@ static void *accesslist_deleter_worker(void *args) { | |||
| 342 | #endif | 342 | #endif |
| 343 | 343 | ||
| 344 | static pthread_t thread_id; | 344 | static pthread_t thread_id; |
| 345 | void accesslist_init() { | 345 | void accesslist_init(void) { |
| 346 | pthread_mutex_init(&g_accesslist_mutex, NULL); | 346 | pthread_mutex_init(&g_accesslist_mutex, NULL); |
| 347 | pthread_create(&thread_id, NULL, accesslist_worker, NULL); | 347 | pthread_create(&thread_id, NULL, accesslist_worker, NULL); |
| 348 | #ifdef WANT_DYNAMIC_ACCESSLIST | 348 | #ifdef WANT_DYNAMIC_ACCESSLIST |
| @@ -444,7 +444,7 @@ void loglist_add_network(const ot_net *net) { | |||
| 444 | pthread_mutex_unlock(&g_lognets_list_mutex); | 444 | pthread_mutex_unlock(&g_lognets_list_mutex); |
| 445 | } | 445 | } |
| 446 | 446 | ||
| 447 | void loglist_reset() { | 447 | void loglist_reset(void) { |
| 448 | pthread_mutex_lock(&g_lognets_list_mutex); | 448 | pthread_mutex_lock(&g_lognets_list_mutex); |
| 449 | free(g_lognets_list.data); | 449 | free(g_lognets_list.data); |
| 450 | g_lognets_list.data = 0; | 450 | g_lognets_list.data = 0; |
diff --git a/ot_accesslist.h b/ot_accesslist.h index 0a7488e..d05e1f7 100644 --- a/ot_accesslist.h +++ b/ot_accesslist.h | |||
| @@ -72,7 +72,7 @@ struct ot_log { | |||
| 72 | extern ot_log *g_logchain_first, *g_logchain_last; | 72 | extern ot_log *g_logchain_first, *g_logchain_last; |
| 73 | 73 | ||
| 74 | void loglist_add_network(const ot_net *net); | 74 | void loglist_add_network(const ot_net *net); |
| 75 | void loglist_reset(); | 75 | void loglist_reset(void); |
| 76 | int loglist_check_address(const ot_ip6 address); | 76 | int loglist_check_address(const ot_ip6 address); |
| 77 | #endif | 77 | #endif |
| 78 | 78 | ||
diff --git a/ot_fullscrape.c b/ot_fullscrape.c index 7a8cca6..b800431 100644 --- a/ot_fullscrape.c +++ b/ot_fullscrape.c | |||
| @@ -88,11 +88,11 @@ static void *fullscrape_worker(void *args) { | |||
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | static pthread_t thread_id; | 90 | static pthread_t thread_id; |
| 91 | void fullscrape_init( ) { | 91 | void fullscrape_init(void) { |
| 92 | pthread_create( &thread_id, NULL, fullscrape_worker, NULL ); | 92 | pthread_create( &thread_id, NULL, fullscrape_worker, NULL ); |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | void fullscrape_deinit( ) { | 95 | void fullscrape_deinit(void) { |
| 96 | pthread_cancel( thread_id ); | 96 | pthread_cancel( thread_id ); |
| 97 | } | 97 | } |
| 98 | 98 | ||
diff --git a/ot_fullscrape.h b/ot_fullscrape.h index bbb2a3f..843e039 100644 --- a/ot_fullscrape.h +++ b/ot_fullscrape.h | |||
| @@ -10,8 +10,8 @@ | |||
| 10 | 10 | ||
| 11 | #include "ot_mutex.h" | 11 | #include "ot_mutex.h" |
| 12 | 12 | ||
| 13 | void fullscrape_init(); | 13 | void fullscrape_init(void); |
| 14 | void fullscrape_deinit(); | 14 | void fullscrape_deinit(void); |
| 15 | void fullscrape_deliver(int64 sock, ot_tasktype tasktype); | 15 | void fullscrape_deliver(int64 sock, ot_tasktype tasktype); |
| 16 | 16 | ||
| 17 | #else | 17 | #else |
| @@ -48,7 +48,7 @@ void mutex_bucket_unlock_by_hash(ot_hash const hash, int delta_torrentcount) { | |||
| 48 | mutex_bucket_unlock(uint32_read_big((char *)hash) >> OT_BUCKET_COUNT_SHIFT, delta_torrentcount); | 48 | mutex_bucket_unlock(uint32_read_big((char *)hash) >> OT_BUCKET_COUNT_SHIFT, delta_torrentcount); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | size_t mutex_get_torrent_count() { return g_torrent_count; } | 51 | size_t mutex_get_torrent_count(void) { return g_torrent_count; } |
| 52 | 52 | ||
| 53 | /* TaskQueue Magic */ | 53 | /* TaskQueue Magic */ |
| 54 | 54 | ||
| @@ -253,7 +253,7 @@ int64 mutex_workqueue_popresult(size_t *iovec_entries, struct iovec **iovec, int | |||
| 253 | return sock; | 253 | return sock; |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | void mutex_init() { | 256 | void mutex_init(void) { |
| 257 | size_t i; | 257 | size_t i; |
| 258 | pthread_mutex_init(&tasklist_mutex, NULL); | 258 | pthread_mutex_init(&tasklist_mutex, NULL); |
| 259 | pthread_cond_init(&tasklist_being_filled, NULL); | 259 | pthread_cond_init(&tasklist_being_filled, NULL); |
| @@ -262,7 +262,7 @@ void mutex_init() { | |||
| 262 | byte_zero(all_torrents, sizeof(all_torrents)); | 262 | byte_zero(all_torrents, sizeof(all_torrents)); |
| 263 | } | 263 | } |
| 264 | 264 | ||
| 265 | void mutex_deinit() { | 265 | void mutex_deinit(void) { |
| 266 | size_t i; | 266 | size_t i; |
| 267 | for (i = 0; i < OT_BUCKET_COUNT; ++i) | 267 | for (i = 0; i < OT_BUCKET_COUNT; ++i) |
| 268 | pthread_mutex_destroy(bucket_mutex + i); | 268 | pthread_mutex_destroy(bucket_mutex + i); |
| @@ -741,7 +741,7 @@ void stats_issue_event(ot_status_event event, PROTO_FLAG proto, uintptr_t event_ | |||
| 741 | } | 741 | } |
| 742 | } | 742 | } |
| 743 | 743 | ||
| 744 | void stats_cleanup() { | 744 | void stats_cleanup(void) { |
| 745 | #ifdef WANT_SPOT_WOODPECKER | 745 | #ifdef WANT_SPOT_WOODPECKER |
| 746 | pthread_mutex_lock(&g_woodpeckers_mutex); | 746 | pthread_mutex_lock(&g_woodpeckers_mutex); |
| 747 | stats_shift_down_network_count(&stats_woodpeckers_tree, 0, 1); | 747 | stats_shift_down_network_count(&stats_woodpeckers_tree, 0, 1); |
| @@ -768,11 +768,11 @@ static void *stats_worker(void *args) { | |||
| 768 | void stats_deliver(int64 sock, int tasktype) { mutex_workqueue_pushtask(sock, tasktype); } | 768 | void stats_deliver(int64 sock, int tasktype) { mutex_workqueue_pushtask(sock, tasktype); } |
| 769 | 769 | ||
| 770 | static pthread_t thread_id; | 770 | static pthread_t thread_id; |
| 771 | void stats_init() { | 771 | void stats_init(void) { |
| 772 | ot_start_time = g_now_seconds; | 772 | ot_start_time = g_now_seconds; |
| 773 | pthread_create(&thread_id, NULL, stats_worker, NULL); | 773 | pthread_create(&thread_id, NULL, stats_worker, NULL); |
| 774 | } | 774 | } |
| 775 | 775 | ||
| 776 | void stats_deinit() { | 776 | void stats_deinit(void) { |
| 777 | pthread_cancel(thread_id); | 777 | pthread_cancel(thread_id); |
| 778 | } | 778 | } |
| @@ -28,7 +28,7 @@ static uint32_t g_rijndael_round_key[44] = {0}; | |||
| 28 | static uint32_t g_key_of_the_hour[2] = {0}; | 28 | static uint32_t g_key_of_the_hour[2] = {0}; |
| 29 | static ot_time g_hour_of_the_key; | 29 | static ot_time g_hour_of_the_key; |
| 30 | 30 | ||
| 31 | static void udp_generate_rijndael_round_key() { | 31 | static void udp_generate_rijndael_round_key(void) { |
| 32 | uint32_t key[16]; | 32 | uint32_t key[16]; |
| 33 | #ifdef WANT_ARC4RANDOM | 33 | #ifdef WANT_ARC4RANDOM |
| 34 | arc4random_buf(&key[0], sizeof(key)); | 34 | arc4random_buf(&key[0], sizeof(key)); |
diff --git a/trackerlogic.c b/trackerlogic.c index 1e25ec8..7f9c893 100644 --- a/trackerlogic.c +++ b/trackerlogic.c | |||
| @@ -552,7 +552,7 @@ void exerr(char *message) { | |||
| 552 | exit(111); | 552 | exit(111); |
| 553 | } | 553 | } |
| 554 | 554 | ||
| 555 | void trackerlogic_init() { | 555 | void trackerlogic_init(void) { |
| 556 | g_tracker_id = random(); | 556 | g_tracker_id = random(); |
| 557 | 557 | ||
| 558 | if (!g_stats_path) | 558 | if (!g_stats_path) |
