From 3e3d89b9de64aaa18f0a10ee20c57093df96d877 Mon Sep 17 00:00:00 2001 From: Wyatt O'Day Date: Mon, 4 Aug 2025 15:37:05 -0400 Subject: [PATCH] Minor code-style fixes. --- lib/vtls/mbedtls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c index 95975260a9..f27c02a606 100644 --- a/lib/vtls/mbedtls.c +++ b/lib/vtls/mbedtls.c @@ -1500,7 +1500,7 @@ static CURLcode mbedtls_random(struct Curl_easy *data, { /* workaround random() being called before the TLS lib is initialized */ if(initialized_tls_lib == FALSE) { - if (mbedtls_init()) + if(mbedtls_init()) initialized_tls_lib = TRUE; else { failf(data, "failed to initialize the mbedTLS library."); @@ -1510,7 +1510,6 @@ static CURLcode mbedtls_random(struct Curl_easy *data, #ifdef MBEDTLS_CTR_DRBG_C int ret = -1; - char errorbuf[128]; #ifdef MBEDTLS_CTR_DRBG_C ret = mbedtls_ctr_drbg_random(&rng.drbg, entropy, length); @@ -1521,6 +1520,7 @@ static CURLcode mbedtls_random(struct Curl_easy *data, #endif if(ret) { + char errorbuf[128]; mbedtls_strerror(ret, errorbuf, sizeof(errorbuf)); failf(data, "mbedtls_ctr_drbg_random returned (-0x%04X) %s", -ret, errorbuf);