summaryrefslogtreecommitdiff
path: root/usr.sbin/bind/lib/isc/heap.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bind/lib/isc/heap.c')
-rw-r--r--usr.sbin/bind/lib/isc/heap.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/usr.sbin/bind/lib/isc/heap.c b/usr.sbin/bind/lib/isc/heap.c
index 4f46f8db041..d006b4773d0 100644
--- a/usr.sbin/bind/lib/isc/heap.c
+++ b/usr.sbin/bind/lib/isc/heap.c
@@ -1,21 +1,21 @@
/*
+ * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1997-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
- * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
- * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: heap.c,v 1.28 2001/06/04 19:33:21 tale Exp $ */
+/* $ISC: heap.c,v 1.28.12.3 2004/03/08 09:04:48 marka Exp $ */
/*
* Heap implementation of priority queues adapted from the following:
@@ -78,7 +78,7 @@ isc_heap_create(isc_mem_t *mctx, isc_heapcompare_t compare,
REQUIRE(heapp != NULL && *heapp == NULL);
REQUIRE(compare != NULL);
- heap = isc_mem_get(mctx, sizeof *heap);
+ heap = isc_mem_get(mctx, sizeof(*heap));
if (heap == NULL)
return (ISC_R_NOMEMORY);
heap->magic = HEAP_MAGIC;
@@ -108,9 +108,9 @@ isc_heap_destroy(isc_heap_t **heapp) {
if (heap->array != NULL)
isc_mem_put(heap->mctx, heap->array,
- heap->size * sizeof (void *));
+ heap->size * sizeof(void *));
heap->magic = 0;
- isc_mem_put(heap->mctx, heap, sizeof *heap);
+ isc_mem_put(heap->mctx, heap, sizeof(*heap));
*heapp = NULL;
}
@@ -123,13 +123,13 @@ resize(isc_heap_t *heap) {
REQUIRE(VALID_HEAP(heap));
new_size = heap->size + heap->size_increment;
- new_array = isc_mem_get(heap->mctx, new_size * sizeof (void *));
+ new_array = isc_mem_get(heap->mctx, new_size * sizeof(void *));
if (new_array == NULL)
return (ISC_FALSE);
if (heap->array != NULL) {
- memcpy(new_array, heap->array, heap->size * sizeof (void *));
+ memcpy(new_array, heap->array, heap->size * sizeof(void *));
isc_mem_put(heap->mctx, heap->array,
- heap->size * sizeof (void *));
+ heap->size * sizeof(void *));
}
heap->size = new_size;
heap->array = new_array;