diff options
Diffstat (limited to 'usr.bin/dig/lib/isc/heap.c')
| -rw-r--r-- | usr.bin/dig/lib/isc/heap.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/usr.bin/dig/lib/isc/heap.c b/usr.bin/dig/lib/isc/heap.c index 53326533eae..4b03e895dc8 100644 --- a/usr.bin/dig/lib/isc/heap.c +++ b/usr.bin/dig/lib/isc/heap.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: heap.c,v 1.4 2020/02/18 18:11:27 florian Exp $ */ +/* $Id: heap.c,v 1.5 2020/02/25 05:00:43 jsg Exp $ */ /*! \file * Heap implementation of priority queues adapted from the following: @@ -26,7 +26,6 @@ * ISBN 0-201-06673-4, chapter 11. */ - #include <stdlib.h> #include <isc/heap.h> #include <string.h> @@ -110,7 +109,6 @@ resize(isc_heap_t *heap) { void **new_array; unsigned int new_size; - new_size = heap->size + heap->size_increment; new_array = malloc(new_size * sizeof(void *)); if (new_array == NULL) @@ -172,7 +170,6 @@ isc_result_t isc_heap_insert(isc_heap_t *heap, void *elt) { unsigned int new_last; - new_last = heap->last + 1; RUNTIME_CHECK(new_last > 0); /* overflow check */ if (new_last >= heap->size && !resize(heap)) |
