[master] 085d3b2 Minor flexelinting

Poul-Henning Kamp phk at FreeBSD.org
Tue Jan 19 00:26:36 CET 2016


commit 085d3b265f071b1e790a0e73bd52f6bb053bf478
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Jan 18 23:26:19 2016 +0000

    Minor flexelinting

diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c
index 824a8c5..e167db3 100644
--- a/bin/varnishd/cache/cache_vcl.c
+++ b/bin/varnishd/cache/cache_vcl.c
@@ -401,7 +401,7 @@ VRT_ref_vcl(VRT_CTX, const char *desc)
 	ALLOC_OBJ(ref, VCLREF_MAGIC);
 	AN(ref);
 	ref->vcl = vcl;
-	snprintf(ref->desc, sizeof ref->desc, "%s", desc);
+	bprintf(ref->desc, "%s", desc);
 
 	Lck_Lock(&vcl_mtx);
 	VTAILQ_INSERT_TAIL(&vcl->ref_list, ref, list);
diff --git a/lib/libvmod_debug/vmod_debug.c b/lib/libvmod_debug/vmod_debug.c
index 76287df..b87e673 100644
--- a/lib/libvmod_debug/vmod_debug.c
+++ b/lib/libvmod_debug/vmod_debug.c
@@ -277,7 +277,7 @@ event_load(VRT_CTX, struct vmod_priv *priv)
 }
 
 static int
-event_warm(VRT_CTX, struct vmod_priv *priv)
+event_warm(VRT_CTX, const struct vmod_priv *priv)
 {
 	struct priv_vcl *priv_vcl;
 	char buf[32];
@@ -294,7 +294,7 @@ event_warm(VRT_CTX, struct vmod_priv *priv)
 	AZ(priv_vcl->vcl);
 	AZ(priv_vcl->vclref);
 
-	snprintf(buf, sizeof buf, "vmod-debug ref on %s", VCL_Name(ctx->vcl));
+	bprintf(buf, "vmod-debug ref on %s", VCL_Name(ctx->vcl));
 	priv_vcl->vcl = ctx->vcl;
 	priv_vcl->vclref = VRT_ref_vcl(ctx, buf);
 	return (0);
@@ -320,7 +320,7 @@ cooldown_thread(void *priv)
 }
 
 static int
-event_cold(VRT_CTX, struct vmod_priv *priv)
+event_cold(VRT_CTX, const struct vmod_priv *priv)
 {
 	pthread_t thread;
 	struct priv_vcl *priv_vcl;



More information about the varnish-commit mailing list