]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Currently termination logic (\0 or \n\0) is hardcoded in _kstrtoull(),
authorAlexey Dobriyan <adobriyan@gmail.com>
Wed, 24 Aug 2011 23:47:36 +0000 (09:47 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Sep 2011 05:16:20 +0000 (15:16 +1000)
commita83a034c1702e176420a61de9041a52f538c94b4
tree1fe9eea1c71fa2cf043dc1a06e4d52732bc3d71d
parent6ff99b35a9473dfe4f42c95a485a1d806b191d67
Currently termination logic (\0 or \n\0) is hardcoded in _kstrtoull(),
avoid that for code reuse between kstrto*() and simple_strtoull().
Essentially, make them different only in termination logic.

simple_strtoull() (and scanf(), BTW) ignores integer overflow, that's a
bug we currently don't have guts to fix, making KSTRTOX_OVERFLOW hack
necessary.

Almost forgot: patch shrinks code size by about ~80 bytes on x86_64.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/kstrtox.c
lib/kstrtox.h [new file with mode: 0644]
lib/vsprintf.c