[master] 0bff803 Eliminate an unused argument.

Poul-Henning Kamp phk at FreeBSD.org
Thu Jan 2 10:51:32 CET 2014


commit 0bff8039e3c5f56b6e15d603d266913a11211239
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Thu Jan 2 09:51:08 2014 +0000

    Eliminate an unused argument.
    
    (And Happy New Year!)

diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index 5998e38..2fe14f3 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -810,7 +810,7 @@ void VBE_UseHealth(const struct director *vdi);
 void VBE_DiscardHealth(const struct director *vdi);
 
 
-struct vbc *VDI_GetFd(const struct director *, struct busyobj *);
+struct vbc *VDI_GetFd(struct busyobj *);
 int VDI_Healthy(const struct director *);
 void VDI_CloseFd(struct vbc **vbp);
 void VDI_RecycleFd(struct vbc **vbp);
diff --git a/bin/varnishd/cache/cache_dir.c b/bin/varnishd/cache/cache_dir.c
index b3f17cf..5ac4e76 100644
--- a/bin/varnishd/cache/cache_dir.c
+++ b/bin/varnishd/cache/cache_dir.c
@@ -101,13 +101,13 @@ VDI_RecycleFd(struct vbc **vbp)
 /* Get a connection --------------------------------------------------*/
 
 struct vbc *
-VDI_GetFd(const struct director *d, struct busyobj *bo)
+VDI_GetFd(struct busyobj *bo)
 {
 	struct vbc *vc;
+	struct director *d;
 
 	CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
-	if (d == NULL)
-		d = bo->director;
+	d = bo->director;
 	CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
 	vc = d->getfd(d, bo);
 	if (vc != NULL)
diff --git a/bin/varnishd/cache/cache_http1_fetch.c b/bin/varnishd/cache/cache_http1_fetch.c
index 1bf8bd1..3adcdc2 100644
--- a/bin/varnishd/cache/cache_http1_fetch.c
+++ b/bin/varnishd/cache/cache_http1_fetch.c
@@ -293,7 +293,7 @@ V1F_fetch_hdr(struct worker *wrk, struct busyobj *bo, struct req *req)
 
 	hp = bo->bereq;
 
-	bo->vbc = VDI_GetFd(NULL, bo);
+	bo->vbc = VDI_GetFd(bo);
 	if (bo->vbc == NULL) {
 		VSLb(bo->vsl, SLT_FetchError, "no backend connection");
 		return (-1);
diff --git a/bin/varnishd/cache/cache_pipe.c b/bin/varnishd/cache/cache_pipe.c
index a049196..b4403bb 100644
--- a/bin/varnishd/cache/cache_pipe.c
+++ b/bin/varnishd/cache/cache_pipe.c
@@ -73,7 +73,7 @@ PipeRequest(struct req *req, struct busyobj *bo)
 	CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
 	CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
 
-	vc = VDI_GetFd(NULL, bo);
+	vc = VDI_GetFd(bo);
 	if (vc == NULL)
 		return;
 	bo->vbc = vc;		/* For panic dumping */



More information about the varnish-commit mailing list