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% :-).
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
Target Milestone: mozilla0.9.2 → mozilla0.9.3
bulk move to 0.9.4
Target Milestone: mozilla0.9.3 → mozilla0.9.4
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
Last Resolved: 18 years ago
Resolution: --- → FIXED
verified. patch checked in.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.