config2setopts: avoid curlx_dyn_addf(..., "%s"

Closes #18194
This commit is contained in:
Daniel Stenberg 2025-08-06 08:02:39 +02:00
parent bf5265ad11
commit e1a0e2b72c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -576,7 +576,7 @@ static CURLcode cookie_setopts(struct OperationConfig *config, CURL *curl)
curlx_dyn_init(&cookies, MAX_COOKIE_LINE);
for(cl = config->cookies; cl; cl = cl->next) {
if(cl == config->cookies)
result = curlx_dyn_addf(&cookies, "%s", cl->data);
result = curlx_dyn_add(&cookies, cl->data);
else
result = curlx_dyn_addf(&cookies, ";%s", cl->data);