[master] 233f5ab00 Revert "vmod_vtc: Insignificant polish"

Nils Goroll nils.goroll at uplex.de
Wed Jul 9 16:58:05 UTC 2025


commit 233f5ab0094bdeae58a1bd941494aad598811d42
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Wed Jul 9 18:55:29 2025 +0200

    Revert "vmod_vtc: Insignificant polish"
    
    d-oh, I undid a fix which I applied and explained myself before in
    1157dfdc61211b95375a3ed10f076f2d7875439c
    
    This reverts commit d9d38175a7c3b9e8ab3568e37d4751d37df0814f.

diff --git a/vmod/vmod_vtc.c b/vmod/vmod_vtc.c
index f43995813..ace8728c3 100644
--- a/vmod/vmod_vtc.c
+++ b/vmod/vmod_vtc.c
@@ -477,10 +477,10 @@ vsl_line(VRT_CTX, char *str)
 		return;
 
 	str = strtok_r(NULL, "\r\n", &save);
+	// needs to be assigned here because of the compound literal lifetime
+	s = TOSTRAND(str);
 	if (str == NULL)
 		s = vrt_null_strands;
-	else
-		s = TOSTRAND(str);
 
 	vmod_vsl(ctx, id, tag, side, s);
 }


More information about the varnish-commit mailing list