[master] a91736a9a Use VSL_OVERHEAD instead of 2
Poul-Henning Kamp
phk at FreeBSD.org
Tue Oct 25 07:55:06 UTC 2022
commit a91736a9a820bf309732f704b06ae162dfd40802
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Oct 25 07:54:40 2022 +0000
Use VSL_OVERHEAD instead of 2
diff --git a/bin/varnishd/cache/cache_shmlog.c b/bin/varnishd/cache/cache_shmlog.c
index 955382580..26e148e64 100644
--- a/bin/varnishd/cache/cache_shmlog.c
+++ b/bin/varnishd/cache/cache_shmlog.c
@@ -240,7 +240,7 @@ vslr(enum VSL_tag_e tag, vxid_t vxid, const char *b, unsigned len)
p = vsl_get(len, 1, 0);
- memcpy(p + 2, b, len);
+ memcpy(p + VSL_OVERHEAD, b, len);
/*
* vsl_hdr() writes p[1] again, but we want to make sure it
@@ -320,7 +320,7 @@ VSL_Flush(struct vsl_log *vsl, int overflow)
p = vsl_get(l, vsl->wlr, overflow);
- memcpy(p + 2, vsl->wlb, l);
+ memcpy(p + VSL_OVERHEAD, vsl->wlb, l);
p[1] = l;
VWMB();
p[0] = ((((unsigned)SLT__Batch & 0xff) << 24));
More information about the varnish-commit
mailing list