Skip to content

Commit

Permalink
IPAddress: Fix zero-initialization of ip6_addr_t (#29167)
Browse files Browse the repository at this point in the history
C-style zero init produces compiler warnings, use C++-style zero init.
  • Loading branch information
rojer authored Sep 13, 2023
1 parent 3e9de93 commit 9d2646b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inet/IPAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ lwip_ip_addr_type IPAddress::ToLwIPAddrType(IPAddressType typ)

ip6_addr_t IPAddress::ToIPv6() const
{
ip6_addr_t ipAddr = { 0 };
ip6_addr_t ipAddr = {};
static_assert(sizeof(ipAddr.addr) == sizeof(Addr), "ip6_addr_t size mismatch");
memcpy(&ipAddr.addr, Addr, sizeof(ipAddr.addr));
return ipAddr;
Expand Down

0 comments on commit 9d2646b

Please sign in to comment.