[6.0] ec8f05464 vrt: Skip the workspace reservation in VRT_IP_string()
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Mon Jun 3 08:46:05 UTC 2024
commit ec8f05464fbed40565103beb4a1d834a1f5b24a1
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 d52ad0bb5..71ecd1d73 100644
--- a/bin/varnishd/cache/cache_vrt.c
+++ b/bin/varnishd/cache/cache_vrt.c
@@ -598,15 +598,12 @@ 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)
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));
}
VCL_STRING v_matchproto_()
More information about the varnish-commit
mailing list