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 and pull[bot] committed Oct 13, 2023
1 parent 11631a8 commit 1050971
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 1050971

Please sign in to comment.