2
0
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:
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

@@ -332,7 +332,7 @@ isc_sockaddr_v6fromin(isc_sockaddr_t *sockaddr, const struct in_addr *ina,
#endif
sockaddr->type.sin6.sin6_addr.s6_addr[10] = 0xff;
sockaddr->type.sin6.sin6_addr.s6_addr[11] = 0xff;
memcpy(&sockaddr->type.sin6.sin6_addr.s6_addr[12], ina, 4);
memmove(&sockaddr->type.sin6.sin6_addr.s6_addr[12], ina, 4);
sockaddr->type.sin6.sin6_port = htons(port);
sockaddr->length = sizeof(sockaddr->type.sin6);
ISC_LINK_INIT(sockaddr, link);
@@ -386,7 +386,7 @@ isc_sockaddr_fromnetaddr(isc_sockaddr_t *sockaddr, const isc_netaddr_t *na,
#ifdef ISC_PLATFORM_HAVESALEN
sockaddr->type.sin6.sin6_len = sizeof(sockaddr->type.sin6);
#endif
memcpy(&sockaddr->type.sin6.sin6_addr, &na->type.in6, 16);
memmove(&sockaddr->type.sin6.sin6_addr, &na->type.in6, 16);
#ifdef ISC_PLATFORM_HAVESCOPEID
sockaddr->type.sin6.sin6_scope_id = isc_netaddr_getzone(na);
#endif