[master] a6afbd76e param: Streamline the bits parameters typedefs

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Feb 21 14:32:06 UTC 2022


commit a6afbd76e69b5833427b8056a8cdf438806fd386
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue Jan 11 10:20:07 2022 +0100

    param: Streamline the bits parameters typedefs

diff --git a/bin/varnishd/common/common_param.h b/bin/varnishd/common/common_param.h
index 5cdd35eea..abdfd6bab 100644
--- a/bin/varnishd/common/common_param.h
+++ b/bin/varnishd/common/common_param.h
@@ -71,10 +71,12 @@ struct poolparam {
 	vtim_dur		max_age;
 };
 
+#define PARAM_BITMAP(name, len) typedef uint8_t name[(len + 7)>>3]
 
-typedef uint8_t vsl_mask_t[256>>3];
-typedef uint8_t debug_t[(DBG_Reserved+7)>>3];
-typedef uint8_t feature_t[(FEATURE_Reserved+7)>>3];
+PARAM_BITMAP(vsl_mask_t,	256);
+PARAM_BITMAP(debug_t,		DBG_Reserved);
+PARAM_BITMAP(feature_t,		FEATURE_Reserved);
+#undef PARAM_BITMAP
 
 struct params {
 


More information about the varnish-commit mailing list