]> git.kernelconcepts.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>
Thu, 15 Sep 2011 06:21:34 +0000 (16:21 +1000)
commita75a96618d6f6b1dcbcbb7a4bd07f7b6ef2253a2
tree9cfd4fcf4c3afe27a3c0247e5b32122bf6975051
parent1b79c91ad568172752df3bb9fa6f20c7b092f7b2
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