diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2020-09-10 21:12:46 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2020-10-11 12:19:26 -0400 |
commit | babf0d0e4c97dab7af08bc9d25f834c116f31919 (patch) | |
tree | 7ea1672282364b4e8e53aed8626b11f84719bba3 /src/buffer.h | |
parent | 9c8981a7d10b14bc213941e3f39058314519fea3 (diff) | |
download | lighttpd-git-babf0d0e4c97dab7af08bc9d25f834c116f31919.tar.gz |
[core] separate http_header_e from _htags bitmask
separate http_header_e index from r->{rqst,resp}_htags bitmask
(allows http_header_e remain 32-bit and to be used in array indexes
while also allowing r->{rqst,resp}_htags to grow to 64-bits wide
in the future, without requiring invasive changes)
Diffstat (limited to 'src/buffer.h')
-rw-r--r-- | src/buffer.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buffer.h b/src/buffer.h index b0006e93..8f3ac33b 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -217,10 +217,10 @@ static inline int light_isalnum(int c) { #define light_isupper(c) ((uint32_t)(c)-'A' <= 'Z'-'A') #define light_islower(c) ((uint32_t)(c)-'a' <= 'z'-'a') -#define light_bshift(b) (b) -#define light_btst(a,b) ((a) & (b)) -#define light_bclr(a,b) ((a) &= ~(b)) -#define light_bset(a,b) ((a) |= (b)) +#define light_bshift(b) (1u << (b)) +#define light_btst(a,b) ((a) & (1u << (b))) +#define light_bclr(a,b) ((a) &= ~(1u << (b))) +#define light_bset(a,b) ((a) |= (1u << (b))) __attribute_pure__ |