diff options
author | Erwin Lansing <erwin@FreeBSD.org> | 2014-02-24 13:57:07 +0000 |
---|---|---|
committer | Erwin Lansing <erwin@FreeBSD.org> | 2014-02-24 13:57:07 +0000 |
commit | e83d3091807de4060c0f7654609c0ba97c607698 (patch) | |
tree | 34b1e1c094bea6410885fbd65ce50ada5dc33cdf /lib/isc/heap.c | |
parent | 2f7409b5f669dbe3c0a8e58d8f526cb6ac4f64e1 (diff) |
Notes
Diffstat (limited to 'lib/isc/heap.c')
-rw-r--r-- | lib/isc/heap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/isc/heap.c b/lib/isc/heap.c index ebadd2fd807c..9d4fd28adc3e 100644 --- a/lib/isc/heap.c +++ b/lib/isc/heap.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007, 2010-2012 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2007, 2010-2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1997-2001 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -32,7 +32,7 @@ #include <isc/heap.h> #include <isc/magic.h> #include <isc/mem.h> -#include <isc/string.h> /* Required for memcpy. */ +#include <isc/string.h> /* Required for memmove. */ #include <isc/util.h> /*@{*/ @@ -123,7 +123,7 @@ isc_heap_destroy(isc_heap_t **heapp) { static isc_boolean_t resize(isc_heap_t *heap) { void **new_array; - size_t new_size; + unsigned int new_size; REQUIRE(VALID_HEAP(heap)); @@ -132,7 +132,7 @@ resize(isc_heap_t *heap) { if (new_array == NULL) return (ISC_FALSE); if (heap->array != NULL) { - memcpy(new_array, heap->array, heap->size * sizeof(void *)); + memmove(new_array, heap->array, heap->size * sizeof(void *)); isc_mem_put(heap->mctx, heap->array, heap->size * sizeof(void *)); } |