diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2021-01-30 08:22:32 +0000 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2021-01-30 08:22:32 +0000 |
commit | dee2d6fbf9008d0e0667b3744d847192be6ef6e0 (patch) | |
tree | fe5f650de6e9d2fb9134e932f5dc0e95eacd812c /src/test/fuzz/util.h | |
parent | c8b83510f42c6959c2844b8b81a6590dd3a34e65 (diff) | |
download | bitcoin-dee2d6fbf9008d0e0667b3744d847192be6ef6e0.tar.xz |
fuzz: Avoid designated initialization (C++20) in fuzz tests
Diffstat (limited to 'src/test/fuzz/util.h')
-rw-r--r-- | src/test/fuzz/util.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/fuzz/util.h b/src/test/fuzz/util.h index a12dc9a56d..e48771efa2 100644 --- a/src/test/fuzz/util.h +++ b/src/test/fuzz/util.h @@ -269,8 +269,8 @@ inline CNetAddr ConsumeNetAddr(FuzzedDataProvider& fuzzed_data_provider) noexcep const Network network = fuzzed_data_provider.PickValueInArray({Network::NET_IPV4, Network::NET_IPV6, Network::NET_INTERNAL, Network::NET_ONION}); CNetAddr net_addr; if (network == Network::NET_IPV4) { - const in_addr v4_addr = { - .s_addr = fuzzed_data_provider.ConsumeIntegral<uint32_t>()}; + in_addr v4_addr = {}; + v4_addr.s_addr = fuzzed_data_provider.ConsumeIntegral<uint32_t>(); net_addr = CNetAddr{v4_addr}; } else if (network == Network::NET_IPV6) { if (fuzzed_data_provider.remaining_bytes() >= 16) { |