]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_cb_hrd: remove global pointer from 'struct HdrCbData'
authorDaniel Stenberg <daniel@haxx.se>
Tue, 5 Aug 2025 12:14:10 +0000 (14:14 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 5 Aug 2025 13:47:56 +0000 (15:47 +0200)
It is not necessary

Closes #18184

src/tool_cb_hdr.c
src/tool_cb_hdr.h
src/tool_operate.c

index 85f74cf16dfb64a2f94f847952e3ed855f99ac4a..d8cd117e35dc989ff5bd7904e6196ddf1da4feb3 100644 (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;
index 7402c12a9b91944887740e5890ce092dcf6ad03e..37be591e70ee921a2a0392201ae9de29be994e83 100644 (file)
@@ -41,7 +41,6 @@
  */
 
 struct HdrCbData {
-  struct GlobalConfig *global;
   struct OperationConfig *config;
   struct OutStruct *outs;
   struct OutStruct *heads;
index 11abc1f9d72000db804ad45e92c03fb098c543f0..e785bc321b4b6228499b376b28f41930dd4049a9 100644 (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);