diff options
author | dougb <dougb@FreeBSD.org> | 2009-05-31 05:42:58 +0000 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2009-05-31 05:42:58 +0000 |
commit | 1e9abbf9ca25c8e19cbc0405a365df5433813cd6 (patch) | |
tree | 21a5399cf53ce4f1ffedece1c1700a317f190f2e /contrib/bind9/lib/isc/heap.c | |
parent | 9babfe9f9b2fa8b533dad4a39b00918df9809aa7 (diff) | |
parent | fd553238c94c3abfef11bfdfc5cb05b32cbe5f76 (diff) | |
download | FreeBSD-src-1e9abbf9ca25c8e19cbc0405a365df5433813cd6.zip FreeBSD-src-1e9abbf9ca25c8e19cbc0405a365df5433813cd6.tar.gz |
Update BIND to version 9.6.1rc1. This version has better performance and
lots of new features compared to 9.4.x, including:
Full NSEC3 support
Automatic zone re-signing
New update-policy methods tcp-self and 6to4-self
DHCID support.
More detailed statistics counters including those supported in BIND 8.
Faster ACL processing.
Efficient LRU cache-cleaning mechanism.
NSID support.
Diffstat (limited to 'contrib/bind9/lib/isc/heap.c')
-rw-r--r-- | contrib/bind9/lib/isc/heap.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/contrib/bind9/lib/isc/heap.c b/contrib/bind9/lib/isc/heap.c index 9c495a7..91d78c0 100644 --- a/contrib/bind9/lib/isc/heap.c +++ b/contrib/bind9/lib/isc/heap.c @@ -1,8 +1,8 @@ /* - * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1997-2001 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or 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. * @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: heap.c,v 1.30.18.3 2006/04/17 18:27:33 explorer Exp $ */ +/* $Id: heap.c,v 1.37 2007/10/19 17:15:53 explorer Exp $ */ /*! \file * Heap implementation of priority queues adapted from the following: @@ -208,9 +208,13 @@ isc_heap_delete(isc_heap_t *heap, unsigned int index) { REQUIRE(index >= 1 && index <= heap->last); if (index == heap->last) { + heap->array[heap->last] = NULL; heap->last--; } else { - elt = heap->array[heap->last--]; + elt = heap->array[heap->last]; + heap->array[heap->last] = NULL; + heap->last--; + less = heap->compare(elt, heap->array[index]); heap->array[index] = elt; if (less) @@ -239,9 +243,11 @@ isc_heap_decreased(isc_heap_t *heap, unsigned int index) { void * isc_heap_element(isc_heap_t *heap, unsigned int index) { REQUIRE(VALID_HEAP(heap)); - REQUIRE(index >= 1 && index <= heap->last); + REQUIRE(index >= 1); - return (heap->array[index]); + if (index <= heap->last) + return (heap->array[index]); + return (NULL); } void |