diff options
author | irungentoo <irungentoo@gmail.com> | 2013-08-05 07:09:47 -0700 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-08-05 07:09:47 -0700 |
commit | dc70dafb0dc71219351db08cad618f5d71711a67 (patch) | |
tree | 0039de12cc0d6576930a45068af9fdfc63063128 /core/net_crypto.c | |
parent | 5e43dc7bd8c790a43c22fd6ab47e9dbef9205186 (diff) | |
parent | 5617bf0bf1827733a9118a0f3ca866cf5353b1e0 (diff) |
Merge pull request #333 from fhahn/void-parameters
Use void for functions with no parameters
Diffstat (limited to 'core/net_crypto.c')
-rw-r--r-- | core/net_crypto.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/net_crypto.c b/core/net_crypto.c index 4ce173c5..1c56b95a 100644 --- a/core/net_crypto.c +++ b/core/net_crypto.c | |||
@@ -440,7 +440,7 @@ int is_cryptoconnected(int crypt_connection_id) | |||
440 | 440 | ||
441 | /* Generate our public and private keys | 441 | /* Generate our public and private keys |
442 | Only call this function the first time the program starts. */ | 442 | Only call this function the first time the program starts. */ |
443 | void new_keys() | 443 | void new_keys(void) |
444 | { | 444 | { |
445 | crypto_box_keypair(self_public_key,self_secret_key); | 445 | crypto_box_keypair(self_public_key,self_secret_key); |
446 | } | 446 | } |
@@ -479,7 +479,7 @@ static int new_incoming(int id) | |||
479 | 479 | ||
480 | /* TODO: optimize this | 480 | /* TODO: optimize this |
481 | handle all new incoming connections. */ | 481 | handle all new incoming connections. */ |
482 | static void handle_incomings() | 482 | static void handle_incomings(void) |
483 | { | 483 | { |
484 | int income; | 484 | int income; |
485 | while (1) { | 485 | while (1) { |
@@ -490,7 +490,7 @@ static void handle_incomings() | |||
490 | } | 490 | } |
491 | 491 | ||
492 | /* handle received packets for not yet established crypto connections. */ | 492 | /* handle received packets for not yet established crypto connections. */ |
493 | static void receive_crypto() | 493 | static void receive_crypto(void) |
494 | { | 494 | { |
495 | uint32_t i; | 495 | uint32_t i; |
496 | for (i = 0; i < MAX_CRYPTO_CONNECTIONS; ++i) { | 496 | for (i = 0; i < MAX_CRYPTO_CONNECTIONS; ++i) { |
@@ -547,7 +547,7 @@ static void receive_crypto() | |||
547 | 547 | ||
548 | /* run this to (re)initialize net_crypto | 548 | /* run this to (re)initialize net_crypto |
549 | sets all the global connection variables to their default values. */ | 549 | sets all the global connection variables to their default values. */ |
550 | void initNetCrypto() | 550 | void initNetCrypto(void) |
551 | { | 551 | { |
552 | memset(crypto_connections, 0 ,sizeof(crypto_connections)); | 552 | memset(crypto_connections, 0 ,sizeof(crypto_connections)); |
553 | memset(incoming_connections, -1 ,sizeof(incoming_connections)); | 553 | memset(incoming_connections, -1 ,sizeof(incoming_connections)); |
@@ -556,7 +556,7 @@ void initNetCrypto() | |||
556 | crypto_connections[i].number = ~0; | 556 | crypto_connections[i].number = ~0; |
557 | } | 557 | } |
558 | 558 | ||
559 | static void killTimedout() | 559 | static void killTimedout(void) |
560 | { | 560 | { |
561 | uint32_t i; | 561 | uint32_t i; |
562 | for (i = 0; i < MAX_CRYPTO_CONNECTIONS; ++i) { | 562 | for (i = 0; i < MAX_CRYPTO_CONNECTIONS; ++i) { |
@@ -570,7 +570,7 @@ static void killTimedout() | |||
570 | } | 570 | } |
571 | 571 | ||
572 | /* main loop */ | 572 | /* main loop */ |
573 | void doNetCrypto() | 573 | void doNetCrypto(void) |
574 | { | 574 | { |
575 | /* TODO:check if friend requests were sent correctly | 575 | /* TODO:check if friend requests were sent correctly |
576 | handle new incoming connections | 576 | handle new incoming connections |