diff options
author | Rosen Penev | 2020-06-03 15:46:25 -0700 |
---|---|---|
committer | Nikias Bassen | 2020-12-30 02:47:55 +0100 |
commit | e7168f30e6fdf0a1f9cffdc9252f52d45e5a59ef (patch) | |
tree | c406fb3830f2079a47918d4b85305a768955c591 /common | |
parent | 98f6e62c6d397c54987bc627e3171363f3c74116 (diff) | |
download | libusbmuxd-e7168f30e6fdf0a1f9cffdc9252f52d45e5a59ef.tar.gz libusbmuxd-e7168f30e6fdf0a1f9cffdc9252f52d45e5a59ef.tar.bz2 |
Do not use else after return or break for better code readability
[clang-tidy] Found with readability-else-after-return
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/socket.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/common/socket.c b/common/socket.c index bcccbae..354e6a4 100644 --- a/common/socket.c +++ b/common/socket.c @@ -738,14 +738,14 @@ static int32_t _sockaddr_in6_scope_id(struct sockaddr_in6* addr) if (addr->sin6_scope_id == addr_in->sin6_scope_id) { res = addr_in->sin6_scope_id; break; - } else { - if ((addr_in->sin6_scope_id > addr->sin6_scope_id) && (res >= 0)) { - // use last valid scope id as we're past the requested scope id - break; - } - res = addr_in->sin6_scope_id; - continue; } + + if ((addr_in->sin6_scope_id > addr->sin6_scope_id) && (res >= 0)) { + // use last valid scope id as we're past the requested scope id + break; + } + res = addr_in->sin6_scope_id; + continue; } /* skip loopback interface if not already matched exactly above */ |