]> err.no Git - varnish/commitdiff
Set the index of deleted elements to zero
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 18 Jul 2006 12:46:23 +0000 (12:46 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 18 Jul 2006 12:46:23 +0000 (12:46 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@492 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/lib/libvarnish/binary_heap.c

index b0bfed8a9429a29a0a01289af4111942d3d92811..bc0ca99c7217073b1262ead10d0b2e46471a9f8b 100644 (file)
@@ -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];