]> err.no Git - varnish/commitdiff
more asserts
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 3 Jul 2006 15:01:14 +0000 (15:01 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 3 Jul 2006 15:01:14 +0000 (15:01 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@284 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/lib/libvarnish/binary_heap.c

index 44219d46dc16a721530ec634f50e5529dd9b22c4..274d337b51d30d2fd360b899b403e6c051acd044 100644 (file)
@@ -136,6 +136,7 @@ binheap_insert(struct binheap *bh, void *p)
 {
        unsigned u;
 
+       assert(bh != NULL);
        assert(bh->magic == BINHEAP_MAGIC);
        assert(bh->length >= bh->next);
        if (bh->length == bh->next) {
@@ -158,6 +159,7 @@ void *
 binheap_root(struct binheap *bh)
 {
 
+       assert(bh != NULL);
        assert(bh->magic == BINHEAP_MAGIC);
        if(bh->next == 0)
                return (NULL);
@@ -168,6 +170,7 @@ void
 binheap_delete(struct binheap *bh, unsigned idx)
 {
 
+       assert(bh != NULL);
        assert(bh->magic == BINHEAP_MAGIC);
        assert(bh->next > 0);
        assert(idx < bh->next);