mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
[master] replace memcpy() with memmove().
3698. [cleanup] Replaced all uses of memcpy() with memmove(). [RT #35120]
This commit is contained in:
@@ -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>
|
||||
|
||||
/*@{*/
|
||||
@@ -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 *));
|
||||
}
|
||||
|
Reference in New Issue
Block a user