diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-08-31 20:40:20 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-09-02 11:02:56 +0100 |
commit | a9fbdaf46b23db5c598bf33d6bc5c4555b06e674 (patch) | |
tree | e7894501bd010d9904fe0069fc1b8121d2da4040 /toxcore/onion.c | |
parent | 6f42eadc54e81be50b7a817c72b0cf4d7ec5feb4 (diff) |
Do not use `else` after `return`.
http://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code
Diffstat (limited to 'toxcore/onion.c')
-rw-r--r-- | toxcore/onion.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/toxcore/onion.c b/toxcore/onion.c index d3512780..0f0abf26 100644 --- a/toxcore/onion.c +++ b/toxcore/onion.c | |||
@@ -77,10 +77,10 @@ static int ip_unpack(IP *target, const uint8_t *data, unsigned int data_size, _B | |||
77 | 77 | ||
78 | if (!disable_family_check) { | 78 | if (!disable_family_check) { |
79 | return to_host_family(target); | 79 | return to_host_family(target); |
80 | } else { | ||
81 | to_host_family(target); | ||
82 | return 0; | ||
83 | } | 80 | } |
81 | |||
82 | to_host_family(target); | ||
83 | return 0; | ||
84 | } | 84 | } |
85 | 85 | ||
86 | static void ipport_pack(uint8_t *data, const IP_Port *source) | 86 | static void ipport_pack(uint8_t *data, const IP_Port *source) |