From 6fc1e6246f9b29334fd6dcb5b832e75cce7a2ecd Mon Sep 17 00:00:00 2001 From: Pauli Date: Fri, 29 Mar 2019 18:31:10 +1000 Subject: [PATCH] Propery initialise struct sslapitest_log_counts to zero using memset. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/8611) --- test/sslapitest.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/sslapitest.c b/test/sslapitest.c index 2a4596dce9..0a99277f87 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -306,9 +306,10 @@ static int test_keylog(void) SSL_CTX *cctx = NULL, *sctx = NULL; SSL *clientssl = NULL, *serverssl = NULL; int testresult = 0; - struct sslapitest_log_counts expected = {0}; + struct sslapitest_log_counts expected; /* Clean up logging space */ + memset(&expected, 0, sizeof(expected)); memset(client_log_buffer, 0, sizeof(client_log_buffer)); memset(server_log_buffer, 0, sizeof(server_log_buffer)); client_log_buffer_index = 0; @@ -387,11 +388,12 @@ static int test_keylog_no_master_key(void) SSL *clientssl = NULL, *serverssl = NULL; SSL_SESSION *sess = NULL; int testresult = 0; - struct sslapitest_log_counts expected = {0}; + struct sslapitest_log_counts expected; unsigned char buf[1]; size_t readbytes, written; /* Clean up logging space */ + memset(&expected, 0, sizeof(expected)); memset(client_log_buffer, 0, sizeof(client_log_buffer)); memset(server_log_buffer, 0, sizeof(server_log_buffer)); client_log_buffer_index = 0;