Use memmove instead of memcpy for potentially overlapping moves.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@19730 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2004-07-13 14:11:27 +00:00
parent de8c918e37
commit b7d1039ea8
3 changed files with 22 additions and 17 deletions

View file

@ -693,7 +693,7 @@ static Class runLoopClass;
rLength -= rWant;
if (rLength > 0)
{
memcpy(bytes, bytes + rWant, rLength);
memmove(bytes, bytes + rWant, rLength);
}
rWant = sizeof(GSPortItemHeader);
d = [mutableDataClass new];
@ -722,7 +722,7 @@ static Class runLoopClass;
rLength -= rWant;
if (rLength > 0)
{
memcpy(bytes, bytes + rWant, rLength);
memmove(bytes, bytes + rWant, rLength);
}
rWant = l;
}
@ -745,7 +745,7 @@ static Class runLoopClass;
rLength -= rWant;
if (rLength > 0)
{
memcpy(bytes, bytes + rWant, rLength);
memmove(bytes, bytes + rWant, rLength);
}
rWant = l;
}
@ -793,7 +793,7 @@ static Class runLoopClass;
rLength -= rWant;
if (rLength > 0)
{
memcpy(bytes, bytes + rWant, rLength);
memmove(bytes, bytes + rWant, rLength);
}
rWant = sizeof(GSPortItemHeader);
if (nItems == 1)
@ -809,7 +809,7 @@ static Class runLoopClass;
rLength -= rWant;
if (rLength > 0)
{
memcpy(bytes, bytes + rWant, rLength);
memmove(bytes, bytes + rWant, rLength);
}
rWant = sizeof(GSPortItemHeader);
}
@ -828,7 +828,7 @@ static Class runLoopClass;
rLength -= rWant;
if (rLength > 0)
{
memcpy(bytes, bytes + rWant, rLength);
memmove(bytes, bytes + rWant, rLength);
}
rWant = sizeof(GSPortItemHeader);
if (nItems == [rItems count])
@ -857,7 +857,7 @@ static Class runLoopClass;
rLength -= rWant;
if (rLength > 0)
{
memcpy(bytes, bytes + rWant, rLength);
memmove(bytes, bytes + rWant, rLength);
}
rWant = sizeof(GSPortItemHeader);