Skip to content

Commit 6027940

Browse files
rojerpull[bot]
authored andcommitted
IPAddress: Fix zero-initialization of ip6_addr_t (#29167)
C-style zero init produces compiler warnings, use C++-style zero init.
1 parent 6fe238f commit 6027940

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/inet/IPAddress.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ lwip_ip_addr_type IPAddress::ToLwIPAddrType(IPAddressType typ)
194194

195195
ip6_addr_t IPAddress::ToIPv6() const
196196
{
197-
ip6_addr_t ipAddr = { 0 };
197+
ip6_addr_t ipAddr = {};
198198
static_assert(sizeof(ipAddr.addr) == sizeof(Addr), "ip6_addr_t size mismatch");
199199
memcpy(&ipAddr.addr, Addr, sizeof(ipAddr.addr));
200200
return ipAddr;

0 commit comments

Comments
 (0)