[master] ce331c3fc Polish vmin usage
Nils Goroll
nils.goroll at uplex.de
Mon Nov 8 16:38:06 UTC 2021
commit ce331c3fc6b6de1ba1a7c52fbaf51aa36abdde83
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Mon Nov 8 17:35:57 2021 +0100
Polish vmin usage
Fixes warning on 32 bit:
comparison of distinct pointer types ('typeof ((*lp)) *' (aka 'int *') and
'typeof (((VRND_RandomTestable() & 3) + 1)) *' (aka 'long *'))
diff --git a/bin/varnishd/cache/cache_esi_fetch.c b/bin/varnishd/cache/cache_esi_fetch.c
index cee4eb57b..0b2d46339 100644
--- a/bin/varnishd/cache/cache_esi_fetch.c
+++ b/bin/varnishd/cache/cache_esi_fetch.c
@@ -279,7 +279,7 @@ vfp_esi_pull(struct vfp_ctx *vc, struct vfp_entry *vfe, void *p, ssize_t *lp)
AN(p);
AN(lp);
if (DO_DEBUG(DBG_ESI_CHOP)) {
- *lp = vmin(*lp, (VRND_RandomTestable() & 3) + 1);
+ *lp = vmin_t(size_t, *lp, (VRND_RandomTestable() & 3) + 1);
}
vp = VFP_Suck(vc, p, lp);
if (vp != VFP_ERROR && *lp > 0)
More information about the varnish-commit
mailing list