[master] 0d2eee601 vrt: Skip the workspace reservation in VRT_IP_string()
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Wed Jan 18 14:53:08 UTC 2023
commit 0d2eee601192273ffa0b5209da36736002b69c1c
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Mon Jan 16 12:33:20 2023 +0100
vrt: Skip the workspace reservation in VRT_IP_string()
diff --git a/bin/varnishd/cache/cache_vrt.c b/bin/varnishd/cache/cache_vrt.c
index d7b8216c5..cc4f1bffb 100644
--- a/bin/varnishd/cache/cache_vrt.c
+++ b/bin/varnishd/cache/cache_vrt.c
@@ -722,7 +722,6 @@ VCL_STRING v_matchproto_()
VRT_IP_string(VRT_CTX, VCL_IP ip)
{
char buf[VTCP_ADDRBUFSIZE];
- struct vsb vsb[1];
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if (ip == NULL) {
@@ -730,9 +729,7 @@ VRT_IP_string(VRT_CTX, VCL_IP ip)
return (NULL);
}
VTCP_name(ip, buf, sizeof buf, NULL, 0);
- WS_VSB_new(vsb, ctx->ws);
- VSB_cat(vsb, buf);
- return (WS_VSB_finish(vsb, ctx->ws, NULL));
+ return (WS_Copy(ctx->ws, buf, -1));
}
int
More information about the varnish-commit
mailing list