eliminate nsCRT::memcmp and all callers to use memcmp instead, bug 118135 r=dp sr=brendan
This commit is contained in:
Родитель
894fdcfaaf
Коммит
8dd5a02295
|
@ -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*
|
||||
|
|
Загрузка…
Ссылка в новой задаче