]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
urldata: remove three unused booleans from struct UserDefined
authorDaniel Stenberg <daniel@haxx.se>
Tue, 31 May 2022 11:42:23 +0000 (13:42 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 1 Jun 2022 06:12:09 +0000 (08:12 +0200)
- is_fwrite_set
- free_referer
- strip_path_slash

Closes #8940

lib/setopt.c
lib/url.c
lib/urldata.h

index 3dfb845ec7cc2d642471e92c45ce0e61d32f99ee..47b8f84715988cbcc5f407baa23e0209a42be9f4 100644 (file)
@@ -1601,13 +1601,9 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
      * Set data write callback
      */
     data->set.fwrite_func = va_arg(param, curl_write_callback);
-    if(!data->set.fwrite_func) {
-      data->set.is_fwrite_set = 0;
+    if(!data->set.fwrite_func)
       /* When set to NULL, reset to our internal default function */
       data->set.fwrite_func = (curl_write_callback)fwrite;
-    }
-    else
-      data->set.is_fwrite_set = 1;
     break;
   case CURLOPT_READFUNCTION:
     /*
index d45fa57eaee2218d3697c9cc9fbd6387f3e55ff0..26ed3dd9365630cc8d39a6b0fa54f80599700d21 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -499,7 +499,6 @@ CURLcode Curl_init_userdefined(struct Curl_easy *data)
   /* use fread as default function to read input */
   set->fread_func_set = (curl_read_callback)fread;
   set->is_fread_set = 0;
-  set->is_fwrite_set = 0;
 
   set->seek_func = ZERO_NULL;
   set->seek_client = ZERO_NULL;
index 145836f57c4d83aae3f7be7317afd3f3f9caac65..e86c241abe12f59e13ab75c5382f751c239c2a73 100644 (file)
@@ -1792,14 +1792,12 @@ struct UserDefined {
   void *trailer_data; /* pointer to pass to trailer data callback */
   curl_trailer_callback trailer_callback; /* trailing data callback */
   BIT(is_fread_set); /* has read callback been set to non-NULL? */
-  BIT(is_fwrite_set); /* has write callback been set to non-NULL? */
-  BIT(free_referer); /* set TRUE if 'referer' points to a string we
-                        allocated */
+#ifndef CURL_DISABLE_TFTP
   BIT(tftp_no_options); /* do not send TFTP options requests */
+#endif
   BIT(sep_headers);     /* handle host and proxy headers separately */
   BIT(cookiesession);   /* new cookie session? */
   BIT(crlf);            /* convert crlf on ftp upload(?) */
-  BIT(strip_path_slash); /* strip off initial slash from path */
   BIT(ssh_compression);            /* enable SSH compression */
 
 /* Here follows boolean settings that define how to behave during