]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix older clang warning on initialization
authorTomas Mraz <tomas@openssl.org>
Fri, 30 Sep 2022 09:32:41 +0000 (11:32 +0200)
committerTomas Mraz <tomas@openssl.org>
Fri, 7 Oct 2022 18:44:36 +0000 (20:44 +0200)
We use memset() instead.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19311)

test/bio_dgram_test.c

index f2b1bb6f4bcfc15874471147f13ee7815625e1ac..1d7ce2773f870d727c3115345a2909ed6cac843d 100644 (file)
@@ -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;
@@ -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)