tool: move the error buffer to the per transfer struct

To avoid having to alloc or manage it separately.

Closes #18442
This commit is contained in:
Daniel Stenberg 2025-08-31 16:24:44 +02:00
parent 54f1ef05d6
commit 84c92f7113
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 10 additions and 27 deletions

View file

@ -361,8 +361,8 @@ static int writeString(FILE *stream, const struct writeoutvar *wovar,
break;
case VAR_ERRORMSG:
if(per_result) {
strinfo = (per->errorbuffer && per->errorbuffer[0]) ?
per->errorbuffer : curl_easy_strerror(per_result);
strinfo = (per->errorbuffer[0]) ? per->errorbuffer :
curl_easy_strerror(per_result);
valid = true;
}
break;