curl: change the struct getout flags field into bitfields

As the flags were use mostly as individual booleans anyway, the code
gets simpler when we use bitfields instead of manual bitwise operations.

Closes #17436
This commit is contained in:
Daniel Stenberg 2025-05-24 00:08:56 +02:00
parent 8ab73bb1ff
commit 65e4444d67
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 39 additions and 42 deletions

View file

@ -231,8 +231,6 @@ struct OperationConfig {
long proxyver; /* set to CURLPROXY_HTTP* define */
int ftp_ssl_ccc_mode;
int ftp_filemethod;
int default_node_flags; /* default flags to search for each 'node', which
is basically each given URL to transfer */
enum {
CLOBBER_DEFAULT, /* Provides compatibility with previous versions of curl,
by using the default behavior for -o, -O, and -J.
@ -244,6 +242,7 @@ struct OperationConfig {
} file_clobber_mode;
unsigned char upload_flags; /* Bitmask for --upload-flags */
unsigned short porttouse;
BIT(remote_name_all); /* --remote-name-all */
BIT(remote_time);
BIT(cookiesession); /* new session? */
BIT(encoding); /* Accept-Encoding please */