[master] 2399d524a http: Polish using pdiff() macro
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Mon Apr 14 15:47:06 UTC 2025
commit 2399d524a686eb86e202464dcd02d7e2ce87cd41
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Tue Apr 1 15:21:38 2025 +0200
http: Polish using pdiff() macro
diff --git a/bin/varnishd/cache/cache_http.c b/bin/varnishd/cache/cache_http.c
index 26ec4d054..31c533f30 100644
--- a/bin/varnishd/cache/cache_http.c
+++ b/bin/varnishd/cache/cache_http.c
@@ -187,9 +187,7 @@ http_hdr_flags(const char *b, const char *e)
if (b == NULL || e == NULL)
return (NULL);
- assert(b <= e);
- u = (unsigned)(e - b);
- assert(b + u == e);
+ u = pdiff(b, e);
if (u < GPERF_MIN_WORD_LENGTH || u > GPERF_MAX_WORD_LENGTH)
return (NULL);
u += http_asso_values[(uint8_t)(e[-1])] +
More information about the varnish-commit
mailing list