Skip to content

Commit

Permalink
Fix older clang warning on initialization
Browse files Browse the repository at this point in the history
We use memset() instead.

Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from openssl#19311)
  • Loading branch information
t8m committed Oct 7, 2022
1 parent fb8bdbe commit 19b6b5f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/bio_dgram_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ static int test_bio_dgram_pair(void)
uint8_t scratch[2048 + 4], scratch2[2048];
uint32_t key[8];
size_t i, num_dgram, num_processed = 0;
BIO_MSG msgs[2] = {0}, rmsgs[2] = {0};
BIO_MSG msgs[2], rmsgs[2];
BIO_ADDR *addr1 = NULL, *addr2 = NULL, *addr3 = NULL, *addr4 = NULL;
struct in_addr in_local;
size_t total = 0;
Expand All @@ -504,6 +504,9 @@ static int test_bio_dgram_pair(void)
| BIO_DGRAM_CAP_PROVIDES_SRC_ADDR
| BIO_DGRAM_CAP_PROVIDES_DST_ADDR;

memset(msgs, 0, sizeof(msgs));
memset(rmsgs, 0, sizeof(rmsgs));

in_local.s_addr = ntohl(0x7f000001);

for (i = 0; i < OSSL_NELEM(key); ++i)
Expand Down

0 comments on commit 19b6b5f

Please sign in to comment.