fix(esp_http_client): address coverity generated warnings

This commit is contained in:
Mahavir Jain
2025-08-20 15:06:48 +05:30
parent 65a6e9c294
commit 70cb9d1a5c
3 changed files with 59 additions and 55 deletions

View File

@@ -41,7 +41,7 @@ static int md5_printf(char *md, const char *fmt, ...)
unsigned char digest[MD5_MAX_LEN];
int len, i;
md5_context_t md5_ctx;
va_list ap;
va_list ap = {0};
va_start(ap, fmt);
len = vasprintf((char **)&buf, fmt, ap);
if (buf == NULL) {
@@ -76,7 +76,7 @@ static int sha256_sprintf(char *sha, const char *fmt, ...)
unsigned char *buf;
unsigned char digest[SHA256_LEN];
int len, i;
va_list ap;
va_list ap = {0};
va_start(ap, fmt);
len = vasprintf((char **)&buf, fmt, ap);
if (buf == NULL) {