2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

[master] replace memcpy() with memmove().

3698.	[cleanup]	Replaced all uses of memcpy() with memmove().
			[RT #35120]
This commit is contained in:
Evan Hunt
2014-01-08 16:27:10 -08:00
parent bfb3305684
commit e851ea8260
126 changed files with 494 additions and 490 deletions

View File

@@ -542,9 +542,9 @@ more_basic_blocks(isc__mem_t *ctx) {
return (ISC_FALSE);
}
if (ctx->basic_table_size != 0) {
memcpy(table, ctx->basic_table,
ctx->basic_table_size *
sizeof(unsigned char *));
memmove(table, ctx->basic_table,
ctx->basic_table_size *
sizeof(unsigned char *));
(ctx->memfree)(ctx->arg, ctx->basic_table);
}
ctx->basic_table = table;
@@ -1580,7 +1580,7 @@ isc___mem_reallocate(isc_mem_t *ctx0, void *ptr, size_t size FLARG) {
oldsize -= ALIGNMENT_SIZE;
}
copysize = (oldsize > size) ? size : oldsize;
memcpy(new_ptr, ptr, copysize);
memmove(new_ptr, ptr, copysize);
isc__mem_free(ctx0, ptr FLARG_PASS);
}
} else if (ptr != NULL)