[master] 086fd76 Minor simplification

Poul-Henning Kamp phk at FreeBSD.org
Mon Oct 6 08:36:34 CEST 2014


commit 086fd762ff168ddc5490d1df1eef1b532c10698d
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Oct 6 06:36:25 2014 +0000

    Minor simplification

diff --git a/bin/varnishd/cache/cache_backend.c b/bin/varnishd/cache/cache_backend.c
index 51e9cb7..bfce9cc 100644
--- a/bin/varnishd/cache/cache_backend.c
+++ b/bin/varnishd/cache/cache_backend.c
@@ -203,24 +203,6 @@ vbe_CheckFd(int fd)
 }
 
 /*--------------------------------------------------------------------
- * Manage a pool of vbc structures.
- * XXX: as an experiment, make this caching controlled by a parameter
- * XXX: so we can see if it has any effect.
- */
-
-static struct vbc *
-vbe_NewConn(void)
-{
-	struct vbc *vc;
-
-	vc = MPL_Get(vbcpool, NULL);
-	XXXAN(vc);
-	vc->magic = VBC_MAGIC;
-	vc->fd = -1;
-	return (vc);
-}
-
-/*--------------------------------------------------------------------
  * Test if backend is healthy and report when it last changed
  */
 
@@ -301,9 +283,10 @@ vbe_GetVbe(struct busyobj *bo, struct vbe_dir *vs)
 		return (NULL);
 	}
 
-	vc = vbe_NewConn();
-	assert(vc->fd == -1);
-	AZ(vc->backend);
+	vc = MPL_Get(vbcpool, NULL);
+	XXXAN(vc);
+	vc->magic = VBC_MAGIC;
+	vc->fd = -1;
 	bes_conn_try(bo, vc, vs);
 	if (vc->fd < 0) {
 		VBE_ReleaseConn(vc);



More information about the varnish-commit mailing list