[master] 1e09e63ff Silence FlexeLint
Poul-Henning Kamp
phk at FreeBSD.org
Mon Nov 14 17:26:05 UTC 2022
commit 1e09e63ff0fe97ed9faff596c87d0809d6f00a34
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Nov 14 17:25:15 2022 +0000
Silence FlexeLint
diff --git a/bin/varnishd/cache/cache_http.c b/bin/varnishd/cache/cache_http.c
index fe6fcb03d..75e66ce6d 100644
--- a/bin/varnishd/cache/cache_http.c
+++ b/bin/varnishd/cache/cache_http.c
@@ -192,8 +192,8 @@ http_hdr_flags(const char *b, const char *e)
assert(b + u == e);
if (u < GPERF_MIN_WORD_LENGTH || u > GPERF_MAX_WORD_LENGTH)
return (NULL);
- u += http_asso_values[((const uint8_t *)b)[u - 1]] +
- http_asso_values[((const uint8_t *)b)[0]];
+ u += http_asso_values[(uint8_t)(e[-1])] +
+ http_asso_values[(uint8_t)(b[0])];
if (u > GPERF_MAX_HASH_VALUE)
return (NULL);
retval = &http_hdrflg[u];
More information about the varnish-commit
mailing list