]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
backout diagnose assertion check accidentally committed with the previous
authorTatuya JINMEI 神明達哉 <jinmei@isc.org>
Thu, 4 Feb 2010 23:41:14 +0000 (23:41 +0000)
committerTatuya JINMEI 神明達哉 <jinmei@isc.org>
Thu, 4 Feb 2010 23:41:14 +0000 (23:41 +0000)
commit.

lib/isc/heap.c

index d25cb501267e36dd26d926676f56f1e1ce6acf89..8020622728d629cdab0bec36cd3d3af72189f589 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: heap.c,v 1.37.240.1 2010/02/04 23:27:32 jinmei Exp $ */
+/* $Id: heap.c,v 1.37.240.2 2010/02/04 23:41:14 jinmei Exp $ */
 
 /*! \file
  * Heap implementation of priority queues adapted from the following:
@@ -149,12 +149,10 @@ float_up(isc_heap_t *heap, unsigned int i, void *elt) {
             i > 1 && heap->compare(elt, heap->array[p]) ;
             i = p, p = heap_parent(i)) {
                heap->array[i] = heap->array[p];
-               INSIST(heap->array[i] != NULL);
                if (heap->index != NULL)
                        (heap->index)(heap->array[i], i);
        }
        heap->array[i] = elt;
-       INSIST(heap->array[i] != NULL);
        if (heap->index != NULL)
                (heap->index)(heap->array[i], i);
 
@@ -175,13 +173,11 @@ sink_down(isc_heap_t *heap, unsigned int i, void *elt) {
                if (heap->compare(elt, heap->array[j]))
                        break;
                heap->array[i] = heap->array[j];
-               INSIST(heap->array[i] != NULL);
                if (heap->index != NULL)
                        (heap->index)(heap->array[i], i);
                i = j;
        }
        heap->array[i] = elt;
-       INSIST(heap->array[i] != NULL);
        if (heap->index != NULL)
                (heap->index)(heap->array[i], i);
 
@@ -209,16 +205,10 @@ void
 isc_heap_delete(isc_heap_t *heap, unsigned int index) {
        void *elt;
        isc_boolean_t less;
-       void **array;
-       unsigned int size, last;
 
        REQUIRE(VALID_HEAP(heap));
        REQUIRE(index >= 1 && index <= heap->last);
 
-       array = heap->array;
-       size = heap->size;
-       last = heap->last;
-
        if (index == heap->last) {
                heap->array[heap->last] = NULL;
                heap->last--;
@@ -227,13 +217,8 @@ isc_heap_delete(isc_heap_t *heap, unsigned int index) {
                heap->array[heap->last] = NULL;
                heap->last--;
 
-               INSIST(array == heap->array &&
-                      size == heap->size &&
-                      last == heap->last + 1);
-
                less = heap->compare(elt, heap->array[index]);
                heap->array[index] = elt;
-               INSIST(heap->array[index] != NULL);
                if (less)
                        float_up(heap, index, heap->array[index]);
                else