Closed
Bug 86358
Opened 23 years ago
Closed 23 years ago
Questionable additional code
Categories
(Core Graveyard :: Networking: FTP, defect, P4)
Core Graveyard
Networking: FTP
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.4
People
(Reporter: drepper, Assigned: dougt)
Details
(Keywords: memory-footprint, Whiteboard: review submitted patch.)
Attachments
(1 file)
1.49 KB,
patch
|
Details | Diff | Splinter Review |
I'm currently reviewing various pieces of code here and there and came across netwerk/streamconv/converters/nsFTPDirListingConv.cpp. The function nsFTPDirListingConv::MonthNumber contains some code to parse the month. This code is questionable as is. Some code paths are not doing any checks which are not necessary. E.g., if the strings starts with an eff February is assumed. I agree with this. But in some code paths tests are performed which do not help to discriminate different valid results. E.g., if the first character is m or M a test is performed whether an a or A follows. But this 'if' has no 'else' path and is therefore unnecessary. I'll append shortly a patch which removes the unnecessary tests. This reduces the code size for me by 140 bytes (hey, it's more than 1% :-).
Reporter | ||
Comment 1•23 years ago
|
||
Assignee | ||
Comment 2•23 years ago
|
||
didn't write the code, but I will try to review the patch for 0.9.2.
Whiteboard: review submitted patch.
Target Milestone: --- → mozilla0.9.2
Reporter | ||
Updated•23 years ago
|
Assignee | ||
Updated•23 years ago
|
Priority: -- → P4
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla0.9.2 → mozilla0.9.3
Assignee | ||
Comment 4•23 years ago
|
||
fix checked in Checking in nsFTPDirListingConv.cpp; /cvsroot/mozilla/netwerk/streamconv/converters/nsFTPDirListingConv.cpp,v <-- nsFTPDirListingConv.cpp new revision: 1.54; previous revision: 1.53 done Checking in nsFTPDirListingConv.h; /cvsroot/mozilla/netwerk/streamconv/converters/nsFTPDirListingConv.h,v <-- nsFTPDirListingConv.h new revision: 1.14; previous revision: 1.13
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•3 months ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•