diff --git a/mozilla/content/html/style/src/nsHTMLAttributes.cpp b/mozilla/content/html/style/src/nsHTMLAttributes.cpp
index 44c72dd690b..4c4d8c01f54 100644
--- a/mozilla/content/html/style/src/nsHTMLAttributes.cpp
+++ b/mozilla/content/html/style/src/nsHTMLAttributes.cpp
@@ -1085,8 +1085,8 @@ HTMLAttributesImpl::UnsetAttributeName(nsIAtom* aAttrName, PRBool& aFound)
memcpy(mNameBuffer, mAttrNames, index * sizeof(nsIAtom*));
}
if (index < mAttrCount) {
- memcpy(&(mNameBuffer[index]), &(mAttrNames[index + 1]),
- (mAttrCount - index) * sizeof(nsIAtom*));
+ memcpy(&mNameBuffer[index], &mAttrNames[index + 1],
+ (mAttrCount - index) * sizeof(nsIAtom*));
}
delete [] mAttrNames;
mAttrNames = mNameBuffer;
diff --git a/mozilla/intl/uconv/src/nsConverterInputStream.cpp b/mozilla/intl/uconv/src/nsConverterInputStream.cpp
index 49b3fc27c67..0eafb0ab390 100644
--- a/mozilla/intl/uconv/src/nsConverterInputStream.cpp
+++ b/mozilla/intl/uconv/src/nsConverterInputStream.cpp
@@ -112,7 +112,7 @@ nsConverterInputStream::Read(PRUnichar* aBuf,
rv = aCount;
}
memcpy(aBuf + aOffset, mUnicharData->GetBuffer() + mUnicharDataOffset,
- rv * sizeof(PRUnichar));
+ rv * sizeof(PRUnichar));
mUnicharDataOffset += rv;
*aReadCount = rv;
return NS_OK;
diff --git a/mozilla/layout/base/nsStyleChangeList.cpp b/mozilla/layout/base/nsStyleChangeList.cpp
index 0dfb6b32107..64d71a76449 100644
--- a/mozilla/layout/base/nsStyleChangeList.cpp
+++ b/mozilla/layout/base/nsStyleChangeList.cpp
@@ -85,8 +85,8 @@ nsStyleChangeList::AppendChange(nsIFrame* aFrame, nsIContent* aContent, PRInt32
if (aContent == mArray[index].mContent) { // remove this change
mCount--;
if (index < mCount) { // move later changes down
- memcpy(&(mArray[index]), &(mArray[index + 1]),
- (mCount - index) * sizeof(nsStyleChangeData));
+ memcpy(&mArray[index], &mArray[index + 1],
+ (mCount - index) * sizeof(nsStyleChangeData));
}
}
}
diff --git a/mozilla/layout/base/src/nsStyleChangeList.cpp b/mozilla/layout/base/src/nsStyleChangeList.cpp
index 0dfb6b32107..64d71a76449 100644
--- a/mozilla/layout/base/src/nsStyleChangeList.cpp
+++ b/mozilla/layout/base/src/nsStyleChangeList.cpp
@@ -85,8 +85,8 @@ nsStyleChangeList::AppendChange(nsIFrame* aFrame, nsIContent* aContent, PRInt32
if (aContent == mArray[index].mContent) { // remove this change
mCount--;
if (index < mCount) { // move later changes down
- memcpy(&(mArray[index]), &(mArray[index + 1]),
- (mCount - index) * sizeof(nsStyleChangeData));
+ memcpy(&mArray[index], &mArray[index + 1],
+ (mCount - index) * sizeof(nsStyleChangeData));
}
}
}
diff --git a/mozilla/layout/generic/nsTextFrame.cpp b/mozilla/layout/generic/nsTextFrame.cpp
index bd167db5132..d48f5d9c369 100644
--- a/mozilla/layout/generic/nsTextFrame.cpp
+++ b/mozilla/layout/generic/nsTextFrame.cpp
@@ -1635,7 +1635,7 @@ nsTextFrame::PrepareUnicodeText(nsTextTransformer& aTX,
n -= contentLen;
if (aTextBuffer != nsnull) {
memcpy(aTextBuffer->mBuffer + dstOffset, bp,
- sizeof(PRUnichar)*wordLen);
+ sizeof(PRUnichar)*wordLen);
}
dstOffset += wordLen;
}
diff --git a/mozilla/layout/generic/nsTextTransformer.cpp b/mozilla/layout/generic/nsTextTransformer.cpp
index 75a215cae30..09412d876e3 100644
--- a/mozilla/layout/generic/nsTextTransformer.cpp
+++ b/mozilla/layout/generic/nsTextTransformer.cpp
@@ -88,7 +88,7 @@ nsAutoTextBuffer::GrowTo(PRInt32 aNewSize, PRBool aCopyToHead)
return NS_ERROR_OUT_OF_MEMORY;
}
memcpy(&newBuffer[aCopyToHead ? 0 : mBufferLen],
- mBuffer, sizeof(PRUnichar) * mBufferLen);
+ mBuffer, sizeof(PRUnichar) * mBufferLen);
if (mBuffer != mAutoBuffer) {
delete [] mBuffer;
}
diff --git a/mozilla/layout/html/base/src/nsTextFrame.cpp b/mozilla/layout/html/base/src/nsTextFrame.cpp
index bd167db5132..d48f5d9c369 100644
--- a/mozilla/layout/html/base/src/nsTextFrame.cpp
+++ b/mozilla/layout/html/base/src/nsTextFrame.cpp
@@ -1635,7 +1635,7 @@ nsTextFrame::PrepareUnicodeText(nsTextTransformer& aTX,
n -= contentLen;
if (aTextBuffer != nsnull) {
memcpy(aTextBuffer->mBuffer + dstOffset, bp,
- sizeof(PRUnichar)*wordLen);
+ sizeof(PRUnichar)*wordLen);
}
dstOffset += wordLen;
}
diff --git a/mozilla/layout/html/base/src/nsTextTransformer.cpp b/mozilla/layout/html/base/src/nsTextTransformer.cpp
index 75a215cae30..09412d876e3 100644
--- a/mozilla/layout/html/base/src/nsTextTransformer.cpp
+++ b/mozilla/layout/html/base/src/nsTextTransformer.cpp
@@ -88,7 +88,7 @@ nsAutoTextBuffer::GrowTo(PRInt32 aNewSize, PRBool aCopyToHead)
return NS_ERROR_OUT_OF_MEMORY;
}
memcpy(&newBuffer[aCopyToHead ? 0 : mBufferLen],
- mBuffer, sizeof(PRUnichar) * mBufferLen);
+ mBuffer, sizeof(PRUnichar) * mBufferLen);
if (mBuffer != mAutoBuffer) {
delete [] mBuffer;
}
diff --git a/mozilla/mailnews/compose/src/nsMsgAppleDecode.cpp b/mozilla/mailnews/compose/src/nsMsgAppleDecode.cpp
index 4724a6c298d..a1e2eb6fde9 100755
--- a/mozilla/mailnews/compose/src/nsMsgAppleDecode.cpp
+++ b/mozilla/mailnews/compose/src/nsMsgAppleDecode.cpp
@@ -595,12 +595,12 @@ int ap_decode_file_infor(appledouble_decode_object *p_ap_decode_obj)
{
reply.sfFile.vRefNum = p_ap_decode_obj->mSpec->vRefNum;
reply.sfFile.parID = p_ap_decode_obj->mSpec->parID;
- memcpy(&reply.sfFile.name, p_ap_decode_obj->mSpec->name , 63 );
+ memcpy(&reply.sfFile.name, p_ap_decode_obj->mSpec->name , 63 );
}
memcpy(p_ap_decode_obj->fname,
- reply.sfFile.name+1,
- *(reply.sfFile.name)+1);
+ reply.sfFile.name+1,
+ *(reply.sfFile.name)+1);
p_ap_decode_obj->fname[*(reply.sfFile.name)] = '\0';
p_ap_decode_obj->vRefNum = reply.sfFile.vRefNum;
diff --git a/mozilla/mailnews/compose/src/nsMsgAppleDecodeStream.cpp b/mozilla/mailnews/compose/src/nsMsgAppleDecodeStream.cpp
index f6e68c746f3..929ed371ef7 100755
--- a/mozilla/mailnews/compose/src/nsMsgAppleDecodeStream.cpp
+++ b/mozilla/mailnews/compose/src/nsMsgAppleDecodeStream.cpp
@@ -274,8 +274,8 @@ net_AppleDouble_Decode_Write (
{
size = 1024 - obj->bytes_in_buff;
memcpy(obj->in_buff+obj->bytes_in_buff,
- s,
- size);
+ s,
+ size);
s += size;
l -= size;
@@ -296,8 +296,8 @@ net_AppleDouble_Decode_Write (
{
/* and we are sure we will not get overflow with the buff. */
memcpy(obj->in_buff+obj->bytes_in_buff,
- s,
- l);
+ s,
+ l);
obj->bytes_in_buff += l;
}
return status;
diff --git a/mozilla/mailnews/compose/src/nsMsgAppleEncode.cpp b/mozilla/mailnews/compose/src/nsMsgAppleEncode.cpp
index 23cbfe71116..248306ee34b 100755
--- a/mozilla/mailnews/compose/src/nsMsgAppleEncode.cpp
+++ b/mozilla/mailnews/compose/src/nsMsgAppleEncode.cpp
@@ -65,8 +65,8 @@ int write_stream(
if (p_ap_encode_obj->pos_outbuff + len < p_ap_encode_obj->s_outbuff)
{
memcpy(p_ap_encode_obj->outbuff + p_ap_encode_obj->pos_outbuff,
- out_string,
- len);
+ out_string,
+ len);
p_ap_encode_obj->pos_outbuff += len;
return noErr;
}
@@ -78,11 +78,11 @@ int write_stream(
int s_len = p_ap_encode_obj->s_outbuff - p_ap_encode_obj->pos_outbuff;
memcpy(p_ap_encode_obj->outbuff + p_ap_encode_obj->pos_outbuff,
- out_string,
- s_len);
+ out_string,
+ s_len);
memcpy(p_ap_encode_obj->b_overflow + p_ap_encode_obj->s_overflow,
- out_string + s_len,
- p_ap_encode_obj->s_overflow += (len - s_len));
+ out_string + s_len,
+ p_ap_encode_obj->s_overflow += (len - s_len));
p_ap_encode_obj->pos_outbuff += s_len;
return errEOB;
}
diff --git a/mozilla/mailnews/compose/src/nsMsgBinHex.cpp b/mozilla/mailnews/compose/src/nsMsgBinHex.cpp
index 40183a043cb..b172f40fa26 100644
--- a/mozilla/mailnews/compose/src/nsMsgBinHex.cpp
+++ b/mozilla/mailnews/compose/src/nsMsgBinHex.cpp
@@ -256,8 +256,8 @@ int binhex_encode_next(
if (p_bh_encode_obj->s_overflow)
{
memcpy(p_bh_encode_obj->overflow,
- p_bh_encode_obj->outbuff,
- p_bh_encode_obj->s_overflow);
+ p_bh_encode_obj->outbuff,
+ p_bh_encode_obj->s_overflow);
p_bh_encode_obj->pos_outbuff = p_bh_encode_obj->s_overflow;
p_bh_encode_obj->s_overflow = 0;
@@ -289,14 +289,14 @@ int binhex_encode_next(
p_bh_encode_obj->state = BINHEX_STATE_HEADER;
memcpy(p_bh_encode_obj->name,
- in_buff,
- in_size);
+ in_buff,
+ in_size);
}
else if (p_bh_encode_obj->state == BINHEX_STATE_HEADER)
{
memcpy(&(p_bh_encode_obj->head),
- in_buff,
- sizeof(binhex_header));
+ in_buff,
+ sizeof(binhex_header));
if (in_size == 20) /* in the platform that alignment is 4-bytes. */
in_size = 18;
@@ -366,7 +366,7 @@ int binhex_reencode_head(
/* make a copy before do the encoding, -- it may modify the head!!!. */
memcpy(buff, (char*)&p_bh_encode_obj->head,
- sizeof(binhex_header));
+ sizeof(binhex_header));
if (18 < sizeof(binhex_header))
{
/* we get an alignment problem here. */
@@ -720,8 +720,8 @@ PRIVATE void binhex_process(
}
memcpy(p_bh_decode_obj->name,
- reply.sfFile.name,
- *(reply.sfFile.name)+1); /* save the new file name. */
+ reply.sfFile.name,
+ *(reply.sfFile.name)+1); /* save the new file name. */
p_bh_decode_obj->vRefNum = reply.sfFile.vRefNum;
p_bh_decode_obj->parID = reply.sfFile.parID;
diff --git a/mozilla/mailnews/imap/src/nsImapMailFolder.cpp b/mozilla/mailnews/imap/src/nsImapMailFolder.cpp
index 10d24fdcee2..8f5fc489263 100644
--- a/mozilla/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mozilla/mailnews/imap/src/nsImapMailFolder.cpp
@@ -2672,7 +2672,7 @@ NS_IMETHODIMP nsImapMailFolder::CopyData(nsIInputStream *aIStream,
{
m_copyState->m_leftOver -= (start - m_copyState->m_dataBuffer);
memcpy(m_copyState->m_dataBuffer, start,
- m_copyState->m_leftOver+1); // including null
+ m_copyState->m_leftOver+1); // including null
maxReadCount = COPY_BUFFER_SIZE - m_copyState->m_leftOver;
}
}
diff --git a/mozilla/mailnews/mime/src/mimebuf.cpp b/mozilla/mailnews/mime/src/mimebuf.cpp
index 95e1a3f958a..dbd5cbb91fb 100644
--- a/mozilla/mailnews/mime/src/mimebuf.cpp
+++ b/mozilla/mailnews/mime/src/mimebuf.cpp
@@ -89,7 +89,7 @@ mime_ReBuffer (const char *net_buffer, PRInt32 net_buffer_size,
size = net_buffer_size;
if (size > 0)
{
- memcpy ((*bufferP) + (*buffer_fpP), net_buffer, size);
+ memcpy ((*bufferP) + (*buffer_fpP), net_buffer, size);
(*buffer_fpP) += size;
net_buffer += size;
net_buffer_size -= size;
diff --git a/mozilla/mailnews/mime/src/mimepbuf.cpp b/mozilla/mailnews/mime/src/mimepbuf.cpp
index 9c78546aaaa..20b58f501ad 100644
--- a/mozilla/mailnews/mime/src/mimepbuf.cpp
+++ b/mozilla/mailnews/mime/src/mimepbuf.cpp
@@ -224,7 +224,7 @@ MimePartBufferWrite (MimePartBufferData *data,
data->part_buffer_fp + size < data->part_buffer_size)
{
memcpy(data->part_buffer + data->part_buffer_fp,
- buf, size);
+ buf, size);
data->part_buffer_fp += size;
}
diff --git a/mozilla/rdf/base/src/nsRDFService.cpp b/mozilla/rdf/base/src/nsRDFService.cpp
index 6c16553cc89..47d7f3b3550 100644
--- a/mozilla/rdf/base/src/nsRDFService.cpp
+++ b/mozilla/rdf/base/src/nsRDFService.cpp
@@ -394,7 +394,7 @@ public:
NS_INIT_REFCNT();
mData.mLength = aLength;
mData.mBytes = new PRUint8[aLength];
- nsCRT::memcpy(mData.mBytes, aBytes, aLength);
+ memcpy(mData.mBytes, aBytes, aLength);
NS_ADDREF(gRDFService);
gRDFService->RegisterBlob(this);
}
diff --git a/mozilla/xpcom/ds/nsCRT.h b/mozilla/xpcom/ds/nsCRT.h
index ad889c917ff..6cc3f9a7d9d 100644
--- a/mozilla/xpcom/ds/nsCRT.h
+++ b/mozilla/xpcom/ds/nsCRT.h
@@ -118,10 +118,6 @@ public:
**** nsCRT::memcpy() is no longer supported.
**** Please use memcpy from standard C instead.
****/
- static void memcpy(void* aDest, const void* aSrc, PRUint32 aCount) {
- NS_ASSERTION((aDest != NULL && aSrc != NULL) || (aCount == 0), "Invalid NULL argument");
- ::memcpy(aDest, aSrc, (size_t)aCount);
- }
static PRInt32 memcmp(const void* aDest, const void* aSrc, PRUint32 aCount) {
NS_ASSERTION((aDest != NULL && aSrc != NULL) || (aCount == 0), "Invalid NULL argument");
diff --git a/mozilla/xpcom/ds/nsValueArray.cpp b/mozilla/xpcom/ds/nsValueArray.cpp
index aaa51c2ce4c..efd5ae439d4 100644
--- a/mozilla/xpcom/ds/nsValueArray.cpp
+++ b/mozilla/xpcom/ds/nsValueArray.cpp
@@ -120,7 +120,7 @@ nsValueArray& nsValueArray::operator=(const nsValueArray& aOther) {
NS_ASSERTION(nsnull != mValueArray, "loss of value array assignment and original data.");
if (nsnull != mValueArray) {
- nsCRT::memcpy(mValueArray, aOther.mValueArray, mCount * mBytesPerValue);
+ memcpy(mValueArray, aOther.mValueArray, mCount * mBytesPerValue);
}
else {
mCount = mCapacity = 0;
diff --git a/mozilla/xpcom/io/nsSegmentedBuffer.cpp b/mozilla/xpcom/io/nsSegmentedBuffer.cpp
index 24393900cec..cabb5e29b30 100644
--- a/mozilla/xpcom/io/nsSegmentedBuffer.cpp
+++ b/mozilla/xpcom/io/nsSegmentedBuffer.cpp
@@ -100,8 +100,8 @@ nsSegmentedBuffer::AppendNewSegment()
if (mFirstSegmentIndex > mLastSegmentIndex) {
// deal with wrap around case
memcpy(&mSegmentArray[mSegmentArrayCount],
- mSegmentArray,
- mLastSegmentIndex * sizeof(char*));
+ mSegmentArray,
+ mLastSegmentIndex * sizeof(char*));
nsCRT::memset(mSegmentArray, 0, mLastSegmentIndex * sizeof(char*));
mLastSegmentIndex += mSegmentArrayCount;
nsCRT::memset(&mSegmentArray[mLastSegmentIndex], 0,
diff --git a/mozilla/xpcom/io/nsUnicharInputStream.cpp b/mozilla/xpcom/io/nsUnicharInputStream.cpp
index 2d000fa78d3..918fe1ec89d 100644
--- a/mozilla/xpcom/io/nsUnicharInputStream.cpp
+++ b/mozilla/xpcom/io/nsUnicharInputStream.cpp
@@ -217,7 +217,7 @@ nsresult UTF8InputStream::Read(PRUnichar* aBuf,
rv = aCount;
}
memcpy(aBuf + aOffset, mUnicharData->GetBuffer() + mUnicharDataOffset,
- rv * sizeof(PRUnichar));
+ rv * sizeof(PRUnichar));
mUnicharDataOffset += rv;
*aReadCount = rv;
return NS_OK;