[Toybox] basename test and bugfix for suffix removal

Elie De Brauwer eliedebrauwer at gmail.com
Sun Feb 12 05:17:49 PST 2012


Hello all,

In attach you can find a patch which adds tests for basename, it also 
fixes an issue where a suffix was wrongfully detected. A suffix was 
detected by using strstr() however any substring occuring the the result 
would also be considered a suffix. I replaced this by a strcmp at the 
end of the result.

Btw basename.c is space-indented not tab-indented. I still have some 
editor wars to fight out but somebody might want to touch this on its 
way out.

my 2 cents
E.

-- 
Elie De Brauwer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: basename_test_and_fake_suffix_removal.patch
Type: text/x-patch
Size: 2080 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20120212/a866e059/attachment-0006.bin>


More information about the Toybox mailing list