From f6c6a159f52315b018f883fde177463aaeac4749 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 21 May 2020 23:53:19 +0200 Subject: 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 --- lib/sendf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3