Mailing List Archive

[master] 73629964c Allocate VSB the canonical way
commit 73629964ce15485619b48b9d3550ac449a7f48ef
Author: Poul-Henning Kamp <phk@FreeBSD.org>
Date: Wed Aug 12 08:36:04 2020 +0000

Allocate VSB the canonical way

diff --git a/bin/varnishstat/varnishstat_help_gen.c b/bin/varnishstat/varnishstat_help_gen.c
index 2b145bed3..1412ea992 100644
--- a/bin/varnishstat/varnishstat_help_gen.c
+++ b/bin/varnishstat/varnishstat_help_gen.c
@@ -45,11 +45,12 @@ static const char help[] = "\n\n"
int
main(void)
{
- struct vsb vsb[1];
+ struct vsb *vsb;
const char *p, *n;
unsigned u;

- AN(VSB_new(vsb, NULL, 0, VSB_AUTOEXTEND));
+ vsb = VSB_new_auto();
+ AN(vsb);
VSB_cat(vsb,
"/*\n"
" * NB: This file is machine generated, DO NOT EDIT!\n"
@@ -83,6 +84,6 @@ main(void)
"const int bindings_help_len = %u;\n", u);
AZ(VSB_finish(vsb));
AZ(VSB_tofile(vsb, STDOUT_FILENO));
- VSB_delete(vsb);
+ VSB_destroy(&vsb);
return (0);
}
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit