LibCore: Fix unitialized struct member in to_address_in, found by Coverity

This commit is contained in:
Brian Gianforcaro 2020-08-16 18:29:00 -07:00 committed by Andreas Kling
parent 73ab030f88
commit 6fa76ed2e3
Notes: sideshowbarker 2024-07-19 03:30:13 +09:00

View file

@ -95,7 +95,7 @@ public:
sockaddr_in to_sockaddr_in() const
{
ASSERT(type() == Type::IPv4);
sockaddr_in address;
sockaddr_in address {};
address.sin_family = AF_INET;
address.sin_addr.s_addr = m_ipv4_address.to_in_addr_t();
address.sin_port = htons(m_port);