]> err.no Git - varnish/commitdiff
Add assert
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 5 Aug 2006 11:07:49 +0000 (11:07 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 5 Aug 2006 11:07:49 +0000 (11:07 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@649 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/lib/libvarnish/binary_heap.c

index abead4e3fa958a661e57d12cf1ca02386f6bda55..5a5a897721739e4ee87bbc33899cda86952164b0 100644 (file)
@@ -177,8 +177,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);
+       assert(idx > 0);
+       bh->update(bh->priv, bh->array[idx], 0);
        if (idx == --bh->next)
                return;
        bh->array[idx] = bh->array[bh->next];