mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-23 18:07:03 +00:00
lib/kstrtox.c: delete end-of-string test
Standard "while (*s)" test is unnecessary because NUL won't pass valid-digit test anyway. Save one branch per parsed character. Link: http://lkml.kernel.org/r/20170514193756.GA32563@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
2c6deb0152
commit
512750ef8b
@ -51,7 +51,7 @@ unsigned int _parse_integer(const char *s, unsigned int base, unsigned long long
|
||||
|
||||
res = 0;
|
||||
rv = 0;
|
||||
while (*s) {
|
||||
while (1) {
|
||||
unsigned int val;
|
||||
|
||||
if ('0' <= *s && *s <= '9')
|
||||
|
Loading…
Reference in New Issue
Block a user