[master] 8e5fd19 Remove last, now unused argument of VFP_Push()

Poul-Henning Kamp phk at FreeBSD.org
Wed Sep 20 19:01:04 UTC 2017


commit 8e5fd19df2529b1706759e47e7e05bd145101f63
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Sep 20 19:00:08 2017 +0000

    Remove last, now unused argument of VFP_Push()

diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 2715c91..2eb23bf 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -509,9 +509,9 @@ vbf_stp_fetchbody(struct worker *wrk, struct busyobj *bo)
 /*--------------------------------------------------------------------
  */
 
-#define vbf_vfp_push(bo, vfp, top)					\
+#define vbf_vfp_push(bo, vfp)						\
 	do {								\
-		if (VFP_Push((bo)->vfc, (vfp), (top)) == NULL) {	\
+		if (VFP_Push((bo)->vfc, (vfp)) == NULL) {	\
 			(bo)->htc->doclose = SC_OVERLOAD;		\
 			VDI_Finish((bo)->wrk, bo);			\
 			return (F_STP_ERROR);				\
@@ -573,19 +573,19 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
 	assert(bo->do_gzip == 0 || bo->do_gunzip == 0);
 
 	if (bo->do_gunzip || (bo->is_gzip && bo->do_esi))
-		vbf_vfp_push(bo, &vfp_gunzip, 1);
+		vbf_vfp_push(bo, &vfp_gunzip);
 
 	if (bo->htc->content_length != 0) {
 		if (bo->do_esi && bo->do_gzip) {
-			vbf_vfp_push(bo, &vfp_esi_gzip, 1);
+			vbf_vfp_push(bo, &vfp_esi_gzip);
 		} else if (bo->do_esi && bo->is_gzip && !bo->do_gunzip) {
-			vbf_vfp_push(bo, &vfp_esi_gzip, 1);
+			vbf_vfp_push(bo, &vfp_esi_gzip);
 		} else if (bo->do_esi) {
-			vbf_vfp_push(bo, &vfp_esi, 1);
+			vbf_vfp_push(bo, &vfp_esi);
 		} else if (bo->do_gzip) {
-			vbf_vfp_push(bo, &vfp_gzip, 1);
+			vbf_vfp_push(bo, &vfp_gzip);
 		} else if (bo->is_gzip && !bo->do_gunzip) {
-			vbf_vfp_push(bo, &vfp_testgunzip, 1);
+			vbf_vfp_push(bo, &vfp_testgunzip);
 		}
 	}
 
diff --git a/bin/varnishd/cache/cache_fetch_proc.c b/bin/varnishd/cache/cache_fetch_proc.c
index 1bb7df3..fcc4924 100644
--- a/bin/varnishd/cache/cache_fetch_proc.c
+++ b/bin/varnishd/cache/cache_fetch_proc.c
@@ -195,7 +195,7 @@ VFP_Suck(struct vfp_ctx *vc, void *p, ssize_t *lp)
 /*--------------------------------------------------------------------
  */
 struct vfp_entry *
-VFP_Push(struct vfp_ctx *vc, const struct vfp *vfp, int top)
+VFP_Push(struct vfp_ctx *vc, const struct vfp *vfp)
 {
 	struct vfp_entry *vfe;
 
@@ -211,12 +211,8 @@ VFP_Push(struct vfp_ctx *vc, const struct vfp *vfp, int top)
 	INIT_OBJ(vfe, VFP_ENTRY_MAGIC);
 	vfe->vfp = vfp;
 	vfe->closed = VFP_OK;
-	if (top)
-		VTAILQ_INSERT_HEAD(&vc->vfp, vfe, list);
-	else
-		VTAILQ_INSERT_TAIL(&vc->vfp, vfe, list);
-	if (VTAILQ_FIRST(&vc->vfp) == vfe)
-		vc->vfp_nxt = vfe;
+	VTAILQ_INSERT_HEAD(&vc->vfp, vfe, list);
+	vc->vfp_nxt = vfe;
 	return (vfe);
 }
 
diff --git a/bin/varnishd/cache/cache_filter.h b/bin/varnishd/cache/cache_filter.h
index 064c94f..6d642aa 100644
--- a/bin/varnishd/cache/cache_filter.h
+++ b/bin/varnishd/cache/cache_filter.h
@@ -74,7 +74,7 @@ extern const struct vfp vfp_testgunzip;
 extern const struct vfp vfp_esi;
 extern const struct vfp vfp_esi_gzip;
 
-struct vfp_entry *VFP_Push(struct vfp_ctx *, const struct vfp *, int top);
+struct vfp_entry *VFP_Push(struct vfp_ctx *, const struct vfp *);
 void VFP_Setup(struct vfp_ctx *vc);
 int VFP_Open(struct vfp_ctx *bo);
 void VFP_Close(struct vfp_ctx *bo);
diff --git a/bin/varnishd/http1/cache_http1_vfp.c b/bin/varnishd/http1/cache_http1_vfp.c
index e57262c..35c13a6 100644
--- a/bin/varnishd/http1/cache_http1_vfp.c
+++ b/bin/varnishd/http1/cache_http1_vfp.c
@@ -267,21 +267,21 @@ V1F_Setup_Fetch(struct vfp_ctx *vfc, struct http_conn *htc)
 	switch (htc->body_status) {
 	case BS_EOF:
 		assert(htc->content_length == -1);
-		vfe = VFP_Push(vfc, &v1f_eof, 0);
+		vfe = VFP_Push(vfc, &v1f_eof);
 		if (vfe == NULL)
 			return (ENOSPC);
 		vfe->priv2 = 0;
 		break;
 	case BS_LENGTH:
 		assert(htc->content_length > 0);
-		vfe = VFP_Push(vfc, &v1f_straight, 0);
+		vfe = VFP_Push(vfc, &v1f_straight);
 		if (vfe == NULL)
 			return (ENOSPC);
 		vfe->priv2 = htc->content_length;
 		break;
 	case BS_CHUNKED:
 		assert(htc->content_length == -1);
-		vfe = VFP_Push(vfc, &v1f_chunked, 0);
+		vfe = VFP_Push(vfc, &v1f_chunked);
 		if (vfe == NULL)
 			return (ENOSPC);
 		vfe->priv2 = -1;
diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index 4dc75f1..4eff4e0 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -750,7 +750,7 @@ h2_req_body(struct req *req)
 
 	CHECK_OBJ(req, REQ_MAGIC);
 	CAST_OBJ_NOTNULL(r2, req->transport_priv, H2_REQ_MAGIC);
-	vfe = VFP_Push(req->vfc, &h2_body, 0);
+	vfe = VFP_Push(req->vfc, &h2_body);
 	AN(vfe);
 	vfe->priv1 = r2;
 }


More information about the varnish-commit mailing list