lib/kstrtox.c: delete end-of-string test
[email protected]
maintainerPATCH 88/115 lib/kstrtox.c: delete end-of-string test
From: Alexey Dobriyan <[email protected]>
Subject: 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.
Signed-off-by Alexey Dobriyan <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
lib/kstrtox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/kstrtox.c renamed from lib/kstrtox.c~kstrtox-delete-end-of-string-test +1 -1
@@ -51,7 +51,7 @@ unsigned int _parse_integer(const char * res =0 ; rv =0 ; -while (*s) { +while (1 ) {unsigned int val;if ('0' <= *s && *s <='9' )
_