Closed Bug 307269 Opened 19 years ago Closed 19 years ago

remove unnecessary |memset| in |nsSaveMsgListener::OnDataAvailable|

Categories

(MailNews Core :: Attachments, defect)

defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: engel, Assigned: engel)

Details

(Keywords: perf)

Attachments

(1 file)

In |nsSaveMsgListener::OnDataAvailable|, 
|m_dataBuffer| is filled with |readCount| bytes and then either
  |Substring(m_dataBuffer, m_dataBuffer + readCount)|  or
  |m_outputStream->Write(m_dataBuffer, readCount, ...)|
is invoked.  Thus, the initial value of |m_dataBuffer[readCount]| is irrelevant.

However, it is initialized a few lines above via |memset|, 
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/base/src/nsMessenger.cpp&rev=1.322#2117
This initialization is unnecessary and should be removed.
Assignee: nobody → Hans-A.Engel
Status: NEW → ASSIGNED
Keywords: perf
Attachment #195066 - Flags: review?(cbiesinger)
Comment on attachment 195066 [details] [diff] [review]
remove inovocation of |memset|

I'd rather not review mailnews code... try a mailnews peer such as bienvenu,
mscott or dmose.
Attachment #195066 - Flags: review?(cbiesinger)
Comment on attachment 195066 [details] [diff] [review]
remove inovocation of |memset|

cbiesinger: Thank you for your quick response! (I saw that you recently worked
on nsMessenger.cpp and also review several patched on it.)
Attachment #195066 - Flags: review?(bienvenu)
oh, almost all of those were tree-wide changes.
Attachment #195066 - Flags: review?(bienvenu) → review+
Attachment #195066 - Flags: superreview?(mscott)
Attachment #195066 - Flags: superreview?(mscott) → superreview?(bienvenu)
Attachment #195066 - Flags: superreview?(bienvenu) → superreview+
Checked in by timeless at 2005-09-25 18:38 PDT.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Verified FIXED using build 2005-09-26-06 Windows XP SeaMonkey trunk on
nightshade.uits.indiana.edu Cyrus IMAP4 Murder v2.2.10.

No problems with IMAP seen thus far. 
Status: RESOLVED → VERIFIED
Blocks: 313038
No longer blocks: 313038
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: