diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2015-02-14 01:36:44 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-14 08:21:36 +0300 |
commit | 8da53d4595a53fb9a3380dd4d1c9bc24c7c9aab8 (patch) | |
tree | 82207634de679fd96287b82ecb9bb5da205a8c2a /CREDITS | |
parent | fcc139ae227b97bd81352e9102d8e79498d1e930 (diff) | |
download | linux-8da53d4595a53fb9a3380dd4d1c9bc24c7c9aab8.tar.xz |
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 <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'CREDITS')
0 files changed, 0 insertions, 0 deletions