[master] 4beea86 TlDupTok() is no longer used.

Poul-Henning Kamp phk at FreeBSD.org
Mon Aug 14 23:50:10 CEST 2017


commit 4beea862df080f1e86c5fd06a231220b9be7e138
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Aug 14 21:11:08 2017 +0000

    TlDupTok() is no longer used.

diff --git a/lib/libvcc/vcc_compile.c b/lib/libvcc/vcc_compile.c
index 290aa8e..a8d0352 100644
--- a/lib/libvcc/vcc_compile.c
+++ b/lib/libvcc/vcc_compile.c
@@ -93,20 +93,6 @@ TlDup(struct vcc *tl, const char *s)
 	return (p);
 }
 
-char *
-TlDupTok(struct vcc *tl, const struct token *tok)
-{
-	char *p;
-	int i;
-
-	i = tok->e - tok->b;
-	p = TlAlloc(tl, i + 1);
-	AN(p);
-	memcpy(p, tok->b, i);
-	p[i] = '\0';
-	return (p);
-}
-
 /*--------------------------------------------------------------------*/
 
 struct inifin *
diff --git a/lib/libvcc/vcc_compile.h b/lib/libvcc/vcc_compile.h
index 3a417e2..547b2bc 100644
--- a/lib/libvcc/vcc_compile.h
+++ b/lib/libvcc/vcc_compile.h
@@ -264,7 +264,6 @@ void EncToken(struct vsb *sb, const struct token *t);
 int IsMethod(const struct token *t);
 void *TlAlloc(struct vcc *tl, unsigned len);
 char *TlDup(struct vcc *tl, const char *s);
-char *TlDupTok(struct vcc *tl, const struct token *tok);
 
 /* vcc_expr.c */
 double vcc_DoubleVal(struct vcc *tl);



More information about the varnish-commit mailing list