mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
fix: Initialize the local variable properly.
- Make sure `pollfd::revents` is initialized.
This commit is contained in:
parent
da60684b9f
commit
1ed65ee9f4
@ -515,9 +515,11 @@ Socket* ListenSocket::Accept()
|
||||
struct sockaddr_storage remote;
|
||||
socklen_t sz = sizeof( remote );
|
||||
|
||||
struct pollfd fd;
|
||||
fd.fd = (socket_t)m_sock;
|
||||
fd.events = POLLIN;
|
||||
struct pollfd fd
|
||||
{
|
||||
.fd = (socket_t)m_sock,
|
||||
.events = POLLIN
|
||||
};
|
||||
|
||||
if( poll( &fd, 1, 10 ) > 0 )
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user