eliminate nsCRT::memcmp and all callers to use memcmp instead, bug 118135 r=dp sr=brendan

This commit is contained in:
cathleen%netscape.com 2002-01-29 21:30:32 +00:00
Родитель 894fdcfaaf
Коммит 8dd5a02295
5 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -817,7 +817,7 @@ imgRequest::SniffMimeType(const char *buf, PRUint32 len)
}
// ICOs always begin with a 2-byte 0 followed by a 2-byte 1.
if (len >= 4 && !nsCRT::memcmp(buf, "\000\000\001\000", 4)) {
if (len >= 4 && !memcmp(buf, "\000\000\001\000", 4)) {
mContentType = nsCRT::strndup("image/x-icon", 12);
return;
}

Просмотреть файл

@ -436,7 +436,7 @@ void nsUnknownDecoder::SniffForImageMimeType(const char *buf, PRUint32 len)
}
// ICOs always begin with a 2-byte 0 followed by a 2-byte 1.
if (len >= 4 && !nsCRT::memcmp(buf, "\000\000\001\000", 4)) {
if (len >= 4 && !memcmp(buf, "\000\000\001\000", 4)) {
mContentType = NS_LITERAL_CSTRING("image/x-icon");
return;
}

Просмотреть файл

@ -432,7 +432,7 @@ BlobImpl::EqualsNode(nsIRDFNode *aNode, PRBool *aEquals)
const PRUint8 *bytes;
blob->GetValue(&bytes);
if (0 == nsCRT::memcmp(bytes, mData.mBytes, length)) {
if (0 == memcmp(bytes, mData.mBytes, length)) {
*aEquals = PR_TRUE;
return NS_OK;
}
@ -498,7 +498,7 @@ struct BlobHashEntry : public PLDHashEntryHdr {
NS_STATIC_CAST(const BlobImpl::Data *, key);
return (left->mLength == right->mLength)
&& 0 == nsCRT::memcmp(left->mBytes, right->mBytes, right->mLength);
&& 0 == memcmp(left->mBytes, right->mBytes, right->mLength);
}
};

Просмотреть файл

@ -119,10 +119,10 @@ public:
**** Please use memcpy from standard C instead.
****/
static PRInt32 memcmp(const void* aDest, const void* aSrc, PRUint32 aCount) {
NS_ASSERTION((aDest != NULL && aSrc != NULL) || (aCount == 0), "Invalid NULL argument");
return ::memcmp(aDest, aSrc, (size_t)aCount);
}
/****
**** nsCRT::memcmp() is no longer supported.
**** Please use memcpy from standard C instead.
****/
static void memmove(void* aDest, const void* aSrc, PRUint32 aCount) {
NS_ASSERTION((aDest != NULL && aSrc != NULL) || (aCount == 0), "Invalid NULL argument");

Просмотреть файл

@ -580,7 +580,7 @@ nsCStringKey::Equals(const nsHashKey* aKey) const
NS_ASSERTION(other->mStrLen != PRUint32(-1), "never called HashCode");
if (mStrLen != other->mStrLen)
return PR_FALSE;
return nsCRT::memcmp(mStr, other->mStr, mStrLen * sizeof(char)) == 0;
return memcmp(mStr, other->mStr, mStrLen * sizeof(char)) == 0;
}
nsHashKey*
@ -678,7 +678,7 @@ nsStringKey::Equals(const nsHashKey* aKey) const
NS_ASSERTION(other->mStrLen != PRUint32(-1), "never called HashCode");
if (mStrLen != other->mStrLen)
return PR_FALSE;
return nsCRT::memcmp(mStr, other->mStr, mStrLen * sizeof(PRUnichar)) == 0;
return memcmp(mStr, other->mStr, mStrLen * sizeof(PRUnichar)) == 0;
}
nsHashKey*
@ -743,7 +743,7 @@ nsOpaqueKey::Equals(const nsHashKey* aKey) const
nsOpaqueKey* other = (nsOpaqueKey*)aKey;
if (mBufLen != other->mBufLen)
return PR_FALSE;
return nsCRT::memcmp(mBuf, other->mBuf, mBufLen) == 0;
return memcmp(mBuf, other->mBuf, mBufLen) == 0;
}
nsHashKey*