aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bitmap.c
diff options
context:
space:
mode:
authorRasmus Villemoes <[email protected]>2015-02-13 22:36:44 +0000
committerLinus Torvalds <[email protected]>2015-02-14 05:21:36 +0000
commit8da53d4595a53fb9a3380dd4d1c9bc24c7c9aab8 (patch)
tree82207634de679fd96287b82ecb9bb5da205a8c2a /lib/bitmap.c
parentfs/namespace: convert devname allocation to kstrdup_const (diff)
downloadkernel-8da53d4595a53fb9a3380dd4d1c9bc24c7c9aab8.tar.gz
kernel-8da53d4595a53fb9a3380dd4d1c9bc24c7c9aab8.zip
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 <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/bitmap.c')
0 files changed, 0 insertions, 0 deletions