summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-05-21 23:53:19 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-05-21 23:53:47 +0200
commitf13f796dd4706b9a1a0531120fc2c2abac9a2a4a (patch)
treec0a3b0f2217b2be5ec1ef32cfb761287ae44a6e1
parent5d965b48987457eb0db01c2eb65712aec37e49f5 (diff)
downloadcurl-f13f796dd4706b9a1a0531120fc2c2abac9a2a4a.tar.gz
Revert "sendf: make failf() use the mvsnprintf() return code"
This reverts commit 74623551f306990e70c7c5515b88972005604a74. Instead mark the function call with (void). Getting the return code and using it instead triggered Coverity warning CID 1463596 because snprintf() can return a negative value...
-rw-r--r--lib/sendf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sendf.c b/lib/sendf.c
index 92caf7cec..6ad32e1b3 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -267,7 +267,8 @@ void Curl_failf(struct Curl_easy *data, const char *fmt, ...)
size_t len;
char error[CURL_ERROR_SIZE + 2];
va_start(ap, fmt);
- len = mvsnprintf(error, CURL_ERROR_SIZE, fmt, ap);
+ mvsnprintf(error, CURL_ERROR_SIZE, fmt, ap);
+ len = strlen(error);
if(data->set.errorbuffer && !data->state.errorbuf) {
strcpy(data->set.errorbuffer, error);