diff options
| author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2014-08-06 16:10:12 -0700 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-11 10:59:31 +0200 |
| commit | c8caa43ff99fecd0218da3c7181e99fdb9debb6d (patch) | |
| tree | 06f43bd15f78deef94796092a66824971f4b1917 /security | |
| parent | 5e54cec5f33efceaf540c94c7b17170cdd0c24e7 (diff) | |
lib: bitmap: simplify bitmap_parselist
We want len to be the index of the first '\n', or the length of the
string if there is no newline. This is a good example of the usefulness
of strchrnul(). Use that instead, thus eliminating a branch and a call
to strlen().
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 'security')
0 files changed, 0 insertions, 0 deletions
