Skip to content

Commit

Permalink
IPAddress: Fix zero-initialization of ip6_addr_t
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 committed Sep 11, 2023
1 parent ae6aa70 commit a3fd3ef
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 a3fd3ef

Please sign in to comment.