1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 02:51:27 +00:00

Replace MemMove, MemCopy, and MemCmp.

This commit is contained in:
Darryl Pogue
2012-01-21 16:25:33 -08:00
committed by Adam Johnson
parent eb946f76a4
commit a14a171774
25 changed files with 56 additions and 56 deletions

View File

@ -218,7 +218,7 @@ DONE:
// If this is an AMD CPU, check for 3DNow support
const char * vendorAmd = "AuthenticAMD";
if (!MemCmp(vendorAmd, cpuVendor, 12)) {
if (!memcmp(vendorAmd, cpuVendor, 12)) {
if (extended & (1 << 31))
*cpuCaps |= kCpuCap3dNow;
}

View File

@ -158,7 +158,7 @@ TBuffer<T> & TBuffer<T>::operator= (const TBuffer<T> & source) {
template<class T>
bool TBuffer<T>::operator== (const TBuffer<T> & source) const {
unsigned size = MemSize(m_data);
return (size == MemSize(source.m_data)) && !MemCmp(m_data, source.m_data, size);
return (size == MemSize(source.m_data)) && !memcmp(m_data, source.m_data, size);
}
//===========================================================================
@ -300,7 +300,7 @@ public:
//===========================================================================
template<class T>
void TArrayCopyBits<T>::Assign (T * dest, const T source[], unsigned count) {
MemMove(dest, source, count * sizeof(T));
memmove(dest, source, count * sizeof(T));
}
//===========================================================================

View File

@ -168,7 +168,7 @@ static void Rc4Codec (
// RC4 uses the same algorithm to both encrypt and decrypt
uint8_t * temp = (uint8_t *)malloc(bytes);
RC4((RC4_KEY *)key->handle, bytes, (const unsigned char *)data, temp);
MemCopy(data, temp, bytes);
memcpy(data, temp, bytes);
free(temp);
}

View File

@ -151,7 +151,7 @@ bool IParseForSubst (
block->isVar = false;
block->strLen = strLen;
block->data = (chartype*)calloc((strLen + 1), sizeof(chartype));
MemCopy(block->data, src, strLen * sizeof(chartype));
memcpy(block->data, src, strLen * sizeof(chartype));
dest->blocks.Add(block);
}
@ -170,7 +170,7 @@ bool IParseForSubst (
block->isVar = true;
block->strLen = strLen;
block->data = (chartype*)calloc((strLen + 1), sizeof(chartype));
MemCopy(block->data, varStart, strLen * sizeof(chartype));
memcpy(block->data, varStart, strLen * sizeof(chartype));
dest->blocks.Add(block);
@ -184,7 +184,7 @@ bool IParseForSubst (
block->isVar = false;
block->strLen = strLen;
block->data = (chartype*)calloc((strLen + 1), sizeof(chartype));
MemCopy(block->data, src, strLen * sizeof(chartype));
memcpy(block->data, src, strLen * sizeof(chartype));
dest->blocks.Add(block);
}

View File

@ -100,6 +100,6 @@ const wchar_t * GuidToHex (const Uuid & uuid, wchar_t * dst, unsigned chars) {
bool GuidFromHex (const uint8_t buf[], unsigned length, Uuid * uuid) {
ASSERT(length == msizeof(Uuid, data));
MemCopy(uuid->data, buf, msizeof(Uuid, data));
memcpy(uuid->data, buf, msizeof(Uuid, data));
return true;
}