Fix compilation when -Werror=maybe-uninitialized is enabled

The `now` struct is not initialized and the compiler complains about it.

Signed-off-by: Adrian Scillato <ascillato@gmail.com>
This commit is contained in:
Adrian Scillato 2024-03-05 10:37:04 -08:00 committed by GitHub
parent 3c4166aef3
commit a50cd0ffd8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2523,7 +2523,7 @@ static int x509_crt_verify_chain(
int signature_is_good;
unsigned self_cnt;
mbedtls_x509_crt *cur_trust_ca = NULL;
mbedtls_x509_time now;
mbedtls_x509_time now = {0};
#if defined(MBEDTLS_HAVE_TIME_DATE)
if (mbedtls_x509_time_gmtime(mbedtls_time(NULL), &now) != 0) {