[master] aa2fc004b param: Give all bits parameters absolute defaults

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Tue Nov 21 06:03:09 UTC 2023


commit aa2fc004b4014ced061bf8e5c6942b22c48c48ea
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue Nov 7 09:06:01 2023 +0100

    param: Give all bits parameters absolute defaults
    
    This is primarily for self-documentation purposes, but also to simplify
    the bit tweak.

diff --git a/bin/varnishd/mgt/mgt_param_tweak.c b/bin/varnishd/mgt/mgt_param_tweak.c
index 82a1e192a..6ec97c01a 100644
--- a/bin/varnishd/mgt/mgt_param_tweak.c
+++ b/bin/varnishd/mgt/mgt_param_tweak.c
@@ -677,9 +677,7 @@ tweak_generic_bits(struct vsb *vsb, const struct parspec *par, const char *arg,
 {
 	unsigned j;
 
-	if (arg != NULL && !strcmp(arg, "default") &&
-	    strcmp(par->def, "none")) {
-		bit_clear(p, l);
+	if (arg != NULL && !strcmp(arg, "default")) {
 		return (tweak_generic_bits(vsb, par, par->def, p, l, tags,
 		    desc, sign));
 	}
diff --git a/include/tbl/params.h b/include/tbl/params.h
index de16b146e..36923172a 100644
--- a/include/tbl/params.h
+++ b/include/tbl/params.h
@@ -1829,6 +1829,7 @@ PARAM_BITS(
 	/* name */	feature,
 	/* fld */	feature_bits,
 	/* def */
+	"none,"
 	"+validate_headers,"
 	"+vcl_req_reset",
 	/* descr */
@@ -1847,6 +1848,7 @@ PARAM_BITS(
 	/* name */	vcc_feature,
 	/* fld */	vcc_feature_bits,
 	/* def */
+	"none,"
 	"+err_unref,"
 	"+unsafe_path",
 	/* descr */
@@ -1865,6 +1867,7 @@ PARAM_BITS(
 	/* name */	vsl_mask,
 	/* fld */	vsl_mask,
 	/* def */
+	"all,"
 	"-Debug,"
 	"-ExpKill,"
 	"-H2RxBody,"


More information about the varnish-commit mailing list