[master] eba8c51d2 vsl: Kill dead check

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Jan 18 15:00:11 UTC 2021


commit eba8c51d2b8738279b5dd6bddcfedfc9696a9088
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Wed Oct 28 15:31:33 2020 +0100

    vsl: Kill dead check
    
    There's only one call site for vtx_dispatch() and it guarantees that len
    is greater than zero.

diff --git a/lib/libvarnishapi/vsl_dispatch.c b/lib/libvarnishapi/vsl_dispatch.c
index 8ce001409..cf11a92a0 100644
--- a/lib/libvarnishapi/vsl_dispatch.c
+++ b/lib/libvarnishapi/vsl_dispatch.c
@@ -439,8 +439,7 @@ vtx_append(struct VSLQ *vslq, struct vtx *vtx, const struct VSLC_ptr *start,
 	enum vsl_check i;
 
 	AN(vtx);
-	if (len == 0)
-		return;
+	AN(len);
 	AN(start);
 
 	i = VSL_Check(vslq->c, start);


More information about the varnish-commit mailing list