]> 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>
Tue, 27 Sep 2011 07:14:02 +0000 (17:14 +1000)
commit1b44a86062d4949a9257332b0d7959b1552b914c
tree2ad38c71fb6b580c9abc94b0f0c10c80c384420c
parentab5be93c75e8c423fc328202a42d88e4971b1a3a
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