[4.1] 1b6b671 Make blacklist mandatory

PÃ¥l Hermunn Johansen hermunn at varnish-software.com
Tue Aug 9 11:36:10 CEST 2016


commit 1b6b671a86344610ee17c8839ae27cc103813b10
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 22dfee3..e5a52a3 100644
--- a/lib/libvmod_directors/vdir.c
+++ b/lib/libvmod_directors/vdir.c
@@ -197,10 +197,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