2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 22:45:39 +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

@@ -340,7 +340,7 @@ isc_netaddr_fromsockaddr(isc_netaddr_t *t, const isc_sockaddr_t *s) {
t->zone = 0;
break;
case AF_INET6:
memcpy(&t->type.in6, &s->type.sin6.sin6_addr, 16);
memmove(&t->type.in6, &s->type.sin6.sin6_addr, 16);
#ifdef ISC_PLATFORM_HAVESCOPEID
t->zone = s->type.sin6.sin6_scope_id;
#else
@@ -349,7 +349,7 @@ isc_netaddr_fromsockaddr(isc_netaddr_t *t, const isc_sockaddr_t *s) {
break;
#ifdef ISC_PLATFORM_HAVESYSUNH
case AF_UNIX:
memcpy(t->type.un, s->type.sunix.sun_path, sizeof(t->type.un));
memmove(t->type.un, s->type.sunix.sun_path, sizeof(t->type.un));
t->zone = 0;
break;
#endif
@@ -429,6 +429,6 @@ isc_netaddr_fromv4mapped(isc_netaddr_t *t, const isc_netaddr_t *s) {
memset(t, 0, sizeof(*t));
t->family = AF_INET;
memcpy(&t->type.in, (char *)&src->type.in6 + 12, 4);
memmove(&t->type.in, (char *)&src->type.in6 + 12, 4);
return;
}