[master] 8cf6443d7 varnishtest: Allocate the exact amount for ${date}
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Tue Jan 12 21:20:10 UTC 2021
commit 8cf6443d794a7ec71457901a49a263e6ea47c0f9
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Tue Jan 12 22:17:28 2021 +0100
varnishtest: Allocate the exact amount for ${date}
It might not make a difference, except for the disappearance of a magic
number.
diff --git a/bin/varnishtest/vtc.c b/bin/varnishtest/vtc.c
index d22e36037..97e895ca0 100644
--- a/bin/varnishtest/vtc.c
+++ b/bin/varnishtest/vtc.c
@@ -220,7 +220,7 @@ macro_get(const char *b, const char *e)
if (l == 4 && !memcmp(b, "date", l)) {
double t = VTIM_real();
- retval = malloc(64);
+ retval = malloc(VTIM_FORMAT_SIZE);
AN(retval);
VTIM_format(t, retval);
return (retval);
More information about the varnish-commit
mailing list