[master] 2427070 Make blacklist mandatory

Guillaume Quintard guillaume at varnish-software.com
Mon Aug 8 10:35:08 CEST 2016


commit 24270700d367f7b833d601459a1a747ec0430548
Author: Guillaume Quintard <guillaume at varnish-software.com>
Date:   Tue Aug 2 14:08:19 2016 +0200

    Make blacklist mandatory

diff --git a/lib/libvmod_directors/vdir.c b/lib/libvmod_directors/vdir.c
index c267104..edee43c 100644
--- a/lib/libvmod_directors/vdir.c
+++ b/lib/libvmod_directors/vdir.c
@@ -193,10 +193,11 @@ vdir_pick_by_weight(const struct vdir *vd, double w,
 	VCL_BACKEND be = NULL;
 	unsigned u;
 
+	AN(blacklist);
 	for (u = 0; u < vd->n_backend; u++) {
 		be = vd->backend[u];
 		CHECK_OBJ_NOTNULL(be, DIRECTOR_MAGIC);
-		if (blacklist != NULL && vbit_test(blacklist, u))
+		if (vbit_test(blacklist, u))
 			continue;
 		a += vd->weight[u];
 		if (w < a)



More information about the varnish-commit mailing list