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:
@ -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;
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user