aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2017-05-26 11:32:12 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2017-05-29 09:23:04 +1000
commit10c346a505960b9e8d158a789d2b7e51c32fa8c3 (patch)
tree91e13a4d337af454fb59118f3f26251b27fa31e8
parentd5282fbcb70994fd50ac538e3f90a30807205392 (diff)
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>
-rw-r--r--lib/kstrtox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kstrtox.c b/lib/kstrtox.c
index bf85e05ce858..90013f4841c7 100644
--- a/lib/kstrtox.c
+++ b/lib/kstrtox.c
@@ -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')