From: phk Date: Tue, 18 Jul 2006 12:46:23 +0000 (+0000) Subject: Set the index of deleted elements to zero X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fcacec4b80445844ec22f024241b0a1fcb3d7a9;p=varnish Set the index of deleted elements to zero git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@492 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/lib/libvarnish/binary_heap.c b/varnish-cache/lib/libvarnish/binary_heap.c index b0bfed8a..bc0ca99c 100644 --- a/varnish-cache/lib/libvarnish/binary_heap.c +++ b/varnish-cache/lib/libvarnish/binary_heap.c @@ -176,6 +176,8 @@ binheap_delete(struct binheap *bh, unsigned idx) 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); if (idx == --bh->next) return; bh->array[idx] = bh->array[bh->next];