]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
mbedtls: remove failf() call with first argument as NULL
authorDaniel Stenberg <daniel@haxx.se>
Fri, 24 Apr 2026 15:23:05 +0000 (17:23 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 24 Apr 2026 15:47:30 +0000 (17:47 +0200)
failf() needs an easy handle to work. This change removes the call since
there is normnally nowhere to show the output if init fails.

Bonus: improve language in an infof() call

Spotted by Copilot

Closes #21441

lib/vtls/mbedtls.c

index 6f90f44cb25891d771e01698db0ebfc29f44b0df..e2822668f085f97fc27c804697f3995b9554fc9f 100644 (file)
@@ -425,7 +425,7 @@ static void mbed_extract_certinfo(struct Curl_easy *data,
     cert_count++;
 
   if(cert_count > MAX_ALLOWED_CERT_AMOUNT) {
-    infof(data, "Certificates is more than allowed (%d), skipping certinfo",
+    infof(data, "More certificates than allowed (%d), skipping certinfo",
           MAX_ALLOWED_CERT_AMOUNT);
     return;
   }
@@ -1513,11 +1513,9 @@ static int mbedtls_init(void)
   ret = mbedtls_ctr_drbg_seed(&rng.drbg, mbedtls_entropy_func, &rng.entropy,
                               NULL, 0);
 
-  if(ret) {
-    failf(NULL, "failed: mbedtls_ctr_drbg_seed returned -0x%x",
-          (unsigned int)-ret);
+  if(ret)
+    /* mbedtls_ctr_drbg_seed returned error */
     return 0;
-  }
 
   /* To prevent an adversary from reading your random data,
      you can enable prediction resistance.