From: Daniel Stenberg Date: Tue, 31 May 2022 11:42:23 +0000 (+0200) Subject: urldata: remove three unused booleans from struct UserDefined X-Git-Tag: curl-7_84_0~106 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b1c1df0b6b82998142c0b974e4295e4288d545bf;p=thirdparty%2Fcurl.git urldata: remove three unused booleans from struct UserDefined - is_fwrite_set - free_referer - strip_path_slash Closes #8940 --- diff --git a/lib/setopt.c b/lib/setopt.c index 3dfb845ec7..47b8f84715 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -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: /* diff --git a/lib/url.c b/lib/url.c index d45fa57eae..26ed3dd936 100644 --- 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; diff --git a/lib/urldata.h b/lib/urldata.h index 145836f57c..e86c241abe 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -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