[master] 12be3d384 vcc: minor VSB polish

Nils Goroll nils.goroll at uplex.de
Tue Oct 26 12:39:06 UTC 2021


commit 12be3d3849d25e01f4d8fa867e86d1025979c83e
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Tue Oct 26 14:35:22 2021 +0200

    vcc: minor VSB polish

diff --git a/lib/libvcc/vcc_symb.c b/lib/libvcc/vcc_symb.c
index 25d824b91..34736072b 100644
--- a/lib/libvcc/vcc_symb.c
+++ b/lib/libvcc/vcc_symb.c
@@ -496,9 +496,7 @@ VCC_GlobalSymbol(struct symbol *sym, vcc_type_t type)
 	sym->lname = strdup(VSB_data(vsb));
 	AN(sym->lname);
 	if (type == SUB) {
-		VSB_destroy(&vsb);
-		vsb = VSB_new_auto();
-		AN(vsb);
+		VSB_clear(vsb);
 		VSB_printf(vsb, "sub_%s", sym->lname);
 		AZ(VSB_finish(vsb));
 	}


More information about the varnish-commit mailing list