From 4e5310cc60dc17e5ef09e57115ca8236544679e4 Mon Sep 17 00:00:00 2001 From: qarmin Date: Wed, 26 Jun 2019 15:08:25 +0200 Subject: Some code changed with Clang-Tidy --- drivers/unix/net_socket_posix.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers/unix/net_socket_posix.cpp') diff --git a/drivers/unix/net_socket_posix.cpp b/drivers/unix/net_socket_posix.cpp index fcd1c3be4b..a2df61ddaa 100644 --- a/drivers/unix/net_socket_posix.cpp +++ b/drivers/unix/net_socket_posix.cpp @@ -221,10 +221,7 @@ bool NetSocketPosix::_can_use_ip(const IP_Address p_ip, const bool p_for_bind) c } // Check if socket support this IP type. IP::Type type = p_ip.is_ipv4() ? IP::TYPE_IPV4 : IP::TYPE_IPV6; - if (_ip_type != IP::TYPE_ANY && !p_ip.is_wildcard() && _ip_type != type) { - return false; - } - return true; + return !(_ip_type != IP::TYPE_ANY && !p_ip.is_wildcard() && _ip_type != type); } void NetSocketPosix::_set_socket(SOCKET_TYPE p_sock, IP::Type p_ip_type, bool p_is_stream) { -- cgit v1.2.3