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

Poul-Henning Kamp phk at FreeBSD.org
Tue Jun 9 20:30:11 UTC 2020


commit c20ad298207735c5aeb0cadd96b147a7fa789fd0
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 001286011..63f6c22ab 100644
--- a/lib/libvmod_directors/shard_dir.c
+++ b/lib/libvmod_directors/shard_dir.c
@@ -129,7 +129,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