mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Review fixes
Update bracket style. Remove erroneous else block.
This commit is contained in:
parent
010376518f
commit
ac9f12a5f6
@ -312,17 +312,14 @@ bool ListenSocket::Listen( int port, int backlog )
|
||||
if( getaddrinfo( nullptr, portbuf, &hints, &res ) != 0 ) return false;
|
||||
|
||||
m_sock = socket( res->ai_family, res->ai_socktype, res->ai_protocol );
|
||||
if (m_sock == -1) {
|
||||
if (m_sock == -1)
|
||||
{
|
||||
// IPV6 protocol may not be available/is disabled. Try to create a socket
|
||||
// with the IPV4 protocol
|
||||
hints.ai_family = AF_INET;
|
||||
if( getaddrinfo( nullptr, portbuf, &hints, &res ) != 0 ) return false;
|
||||
m_sock = socket( res->ai_family, res->ai_socktype, res->ai_protocol );
|
||||
if (m_sock == -1) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
if (m_sock == -1) return false;
|
||||
}
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
unsigned long val = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user