[6.0] 092239ab2 ->idx is unsigned, so cannot be < 0 (and GCC sux).

Reza Naghibi reza at naghibi.com
Wed Aug 19 13:17:07 UTC 2020


commit 092239ab2a148d1e185ba3756f3050e5b61fe034
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Jun 9 20:28:58 2020 +0000

    ->idx is unsigned, so cannot be < 0 (and GCC sux).

diff --git a/lib/libvmod_directors/shard_dir.c b/lib/libvmod_directors/shard_dir.c
index 47f7b4927..a07bb1e3f 100644
--- a/lib/libvmod_directors/shard_dir.c
+++ b/lib/libvmod_directors/shard_dir.c
@@ -170,7 +170,6 @@ shard_next(struct shard_state *state, VCL_INT skip, VCL_BOOL healthy)
 	struct shard_be_info *sbe;
 
 	AN(state);
-	assert(state->idx >= 0);
 	CHECK_OBJ_NOTNULL(state->shardd, SHARDDIR_MAGIC);
 
 	if (state->pickcount >= state->shardd->n_backend)


More information about the varnish-commit mailing list