Skip to content

Commit

Permalink
Remove use_dynamic_buffer bool from lwan_config struct
Browse files Browse the repository at this point in the history
No need for this to be there anymore.  Also, change all the bools
at the end to bitfields of width 1 in an unsigned int.
  • Loading branch information
lpereira committed Apr 16, 2024
1 parent 7ea760e commit 054212c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
4 changes: 0 additions & 4 deletions src/lib/lwan.c
Expand Up @@ -65,7 +65,6 @@ static const struct lwan_config default_config = {
.allow_post_temp_file = false,
.max_put_data_size = 10 * DEFAULT_BUFFER_SIZE,
.allow_put_temp_file = false,
.use_dynamic_buffer = false,
};

LWAN_HANDLER_ROUTE(brew_coffee, NULL /* do not autodetect this route */)
Expand Down Expand Up @@ -633,9 +632,6 @@ static bool setup_from_config(struct lwan *lwan, const char *path)
} else if (streq(line->key, "allow_cors")) {
lwan->config.allow_cors =
parse_bool(line->value, default_config.allow_cors);
} else if (streq(line->key, "use_dynamic_buffer")) {
lwan->config.use_dynamic_buffer =
parse_bool(line->value, default_config.use_dynamic_buffer);
} else if (streq(line->key, "expires")) {
lwan->config.expires =
parse_time_period(line->value, default_config.expires);
Expand Down
11 changes: 5 additions & 6 deletions src/lib/lwan.h
Expand Up @@ -530,12 +530,11 @@ struct lwan_config {
unsigned int expires;
unsigned int n_threads;

bool quiet;
bool proxy_protocol;
bool allow_cors;
bool allow_post_temp_file;
bool allow_put_temp_file;
bool use_dynamic_buffer;
unsigned int quiet : 1;
unsigned int proxy_protocol : 1;
unsigned int allow_cors : 1;
unsigned int allow_post_temp_file : 1;
unsigned int allow_put_temp_file : 1;
};

struct lwan {
Expand Down

0 comments on commit 054212c

Please sign in to comment.