r649 - trunk/varnish-cache/lib/libvarnish

phk at projects.linpro.no phk at projects.linpro.no
Sat Aug 5 13:07:49 CEST 2006


Author: phk
Date: 2006-08-05 13:07:49 +0200 (Sat, 05 Aug 2006)
New Revision: 649

Modified:
   trunk/varnish-cache/lib/libvarnish/binary_heap.c
Log:
Add assert


Modified: trunk/varnish-cache/lib/libvarnish/binary_heap.c
===================================================================
--- trunk/varnish-cache/lib/libvarnish/binary_heap.c	2006-08-05 10:31:30 UTC (rev 648)
+++ trunk/varnish-cache/lib/libvarnish/binary_heap.c	2006-08-05 11:07:49 UTC (rev 649)
@@ -177,8 +177,8 @@
 	assert(bh->magic == BINHEAP_MAGIC);
 	assert(bh->next > ROOT_IDX);
 	assert(idx < bh->next);
-	if (bh->update != NULL)
-		bh->update(bh->priv, bh->array[idx], 0);
+	assert(idx > 0);
+	bh->update(bh->priv, bh->array[idx], 0);
 	if (idx == --bh->next)
 		return;
 	bh->array[idx] = bh->array[bh->next];




More information about the varnish-commit mailing list