tool_cb_hrd: remove global pointer from 'struct HdrCbData'

It is not necessary

Closes #18184
This commit is contained in:
Daniel Stenberg 2025-08-05 14:14:10 +02:00
parent b3b7d65239
commit 952117c032
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 2 additions and 4 deletions

View file

@ -286,11 +286,11 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
if(!outs->stream && !tool_create_output_file(outs, per->config))
return CURL_WRITEFUNC_ERROR;
if(hdrcbdata->global->isatty &&
if(hdrcbdata->config->global->isatty &&
#ifdef _WIN32
tool_term_has_bold &&
#endif
hdrcbdata->global->styled_output)
hdrcbdata->config->global->styled_output)
value = memchr(ptr, ':', cb);
if(value) {
size_t namelen = value - ptr;

View file

@ -41,7 +41,6 @@
*/
struct HdrCbData {
struct GlobalConfig *global;
struct OperationConfig *config;
struct OutStruct *outs;
struct OutStruct *heads;

View file

@ -1353,7 +1353,6 @@ static CURLcode single_transfer(struct OperationConfig *config,
hdrcbdata->outs = outs;
hdrcbdata->heads = heads;
hdrcbdata->etag_save = etag_save;
hdrcbdata->global = global;
hdrcbdata->config = config;
result = config2setopts(config, per, curl, share);