From: Rasmus Villemoes Date: Fri, 13 Feb 2015 22:36:44 +0000 (-0800) Subject: lib/string.c: improve strrchr() X-Git-Tag: fixes-v4.0-rc1~107^2~91 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8da53d4595a53fb9a3380dd4d1c9bc24c7c9aab8;p=pandora-kernel.git lib/string.c: improve strrchr() Instead of potentially passing over the string twice in case c is not found, just keep track of the last occurrence. According to bloat-o-meter, this also cuts the generated code by a third (54 vs 36 bytes). Oh, and we get rid of those 7-space indented lines. Signed-off-by: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed