summaryrefslogtreecommitdiff
path: root/auto_tests/dht_test.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2016-08-31 20:40:20 +0100
committeriphydf <iphydf@users.noreply.github.com>2016-09-02 11:02:56 +0100
commita9fbdaf46b23db5c598bf33d6bc5c4555b06e674 (patch)
treee7894501bd010d9904fe0069fc1b8121d2da4040 /auto_tests/dht_test.c
parent6f42eadc54e81be50b7a817c72b0cf4d7ec5feb4 (diff)
Do not use `else` after `return`.
http://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code
Diffstat (limited to 'auto_tests/dht_test.c')
-rw-r--r--auto_tests/dht_test.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/auto_tests/dht_test.c b/auto_tests/dht_test.c
index 92209e7a..7aab9573 100644
--- a/auto_tests/dht_test.c
+++ b/auto_tests/dht_test.c
@@ -404,10 +404,10 @@ void test_add_to_list(uint8_t cmp_list[][crypto_box_PUBLICKEYBYTES + 1], unsigne
404 memcpy(cmp_list[i], pk, crypto_box_PUBLICKEYBYTES); 404 memcpy(cmp_list[i], pk, crypto_box_PUBLICKEYBYTES);
405 cmp_list[i][crypto_box_PUBLICKEYBYTES] = 1; 405 cmp_list[i][crypto_box_PUBLICKEYBYTES] = 1;
406 return; 406 return;
407 } else { 407 }
408 if (memcmp(cmp_list[i], pk, crypto_box_PUBLICKEYBYTES) == 0) { 408
409 return; 409 if (memcmp(cmp_list[i], pk, crypto_box_PUBLICKEYBYTES) == 0) {
410 } 410 return;
411 } 411 }
412 } 412 }
413 413
@@ -557,8 +557,6 @@ END_TEST
557 557
558void ip_callback(void *data, int32_t number, IP_Port ip_port) 558void ip_callback(void *data, int32_t number, IP_Port ip_port)
559{ 559{
560
561
562} 560}
563 561
564 562