Skip to content

Commit 054212c

Browse files
committed
Remove use_dynamic_buffer bool from lwan_config struct
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.
1 parent 7ea760e commit 054212c

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

src/lib/lwan.c

-4
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ static const struct lwan_config default_config = {
6565
.allow_post_temp_file = false,
6666
.max_put_data_size = 10 * DEFAULT_BUFFER_SIZE,
6767
.allow_put_temp_file = false,
68-
.use_dynamic_buffer = false,
6968
};
7069

7170
LWAN_HANDLER_ROUTE(brew_coffee, NULL /* do not autodetect this route */)
@@ -633,9 +632,6 @@ static bool setup_from_config(struct lwan *lwan, const char *path)
633632
} else if (streq(line->key, "allow_cors")) {
634633
lwan->config.allow_cors =
635634
parse_bool(line->value, default_config.allow_cors);
636-
} else if (streq(line->key, "use_dynamic_buffer")) {
637-
lwan->config.use_dynamic_buffer =
638-
parse_bool(line->value, default_config.use_dynamic_buffer);
639635
} else if (streq(line->key, "expires")) {
640636
lwan->config.expires =
641637
parse_time_period(line->value, default_config.expires);

src/lib/lwan.h

+5-6
Original file line numberDiff line numberDiff line change
@@ -530,12 +530,11 @@ struct lwan_config {
530530
unsigned int expires;
531531
unsigned int n_threads;
532532

533-
bool quiet;
534-
bool proxy_protocol;
535-
bool allow_cors;
536-
bool allow_post_temp_file;
537-
bool allow_put_temp_file;
538-
bool use_dynamic_buffer;
533+
unsigned int quiet : 1;
534+
unsigned int proxy_protocol : 1;
535+
unsigned int allow_cors : 1;
536+
unsigned int allow_post_temp_file : 1;
537+
unsigned int allow_put_temp_file : 1;
539538
};
540539

541540
struct lwan {

0 commit comments

Comments
 (0)