Commit 5b843891 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add assert


git-svn-id: http://www.varnish-cache.org/svn/trunk@649 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 6106aa4a
......@@ -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];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment