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.
bulk move to 0.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
verified. patch checked in.