aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-05-21 23:53:19 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-05-22 12:34:51 +0200
commitf6c6a159f52315b018f883fde177463aaeac4749 (patch)
tree0714454bc5a5110e445878ec22819663962ab334 /lib
parent5d965b48987457eb0db01c2eb65712aec37e49f5 (diff)
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... Closes #5441
Diffstat (limited to 'lib')
-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..147ecbfa5 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);
+ (void)mvsnprintf(error, CURL_ERROR_SIZE, fmt, ap);
+ len = strlen(error);
if(data->set.errorbuffer && !data->state.errorbuf) {
strcpy(data->set.errorbuffer, error);