[master] b4968da50 Use VSL_DATA and VSL_BYTES macros
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Thu Jul 6 15:17:13 UTC 2023
commit b4968da505d28c4b8967702c84941301363ee44e
Author: Darryl Rodden <darryl.rodden at varnish-software.com>
Date: Tue Mar 7 10:27:13 2023 -0700
Use VSL_DATA and VSL_BYTES macros
diff --git a/lib/libvarnishapi/vsl_dispatch.c b/lib/libvarnishapi/vsl_dispatch.c
index 14d3dc20d..25e1e81b0 100644
--- a/lib/libvarnishapi/vsl_dispatch.c
+++ b/lib/libvarnishapi/vsl_dispatch.c
@@ -1038,8 +1038,8 @@ vtx_synth_rec(struct vtx *vtx, unsigned tag, const char *fmt, ...)
ALLOC_OBJ(synth, SYNTH_MAGIC);
AN(synth);
- buf = (char *)&synth->data[VSL_OVERHEAD];
- buflen = sizeof (synth->data) - VSL_OVERHEAD * sizeof (uint32_t);
+ buf = VSL_DATA(synth->data);
+ buflen = sizeof(synth->data) - VSL_BYTES(VSL_OVERHEAD);
va_start(ap, fmt);
l = vsnprintf(buf, buflen, fmt, ap);
assert(l >= 0);
More information about the varnish-commit
mailing list