mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
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:
parent
de8c918e37
commit
b7d1039ea8
3 changed files with 22 additions and 17 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue