]> 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>
Mon, 12 Sep 2011 05:27:30 +0000 (15:27 +1000)
commit1050070483b120a24a988fa9bfa17071410eeba8
treeccfefdfa15302e9631f173cfe497dc4ca4e99c8a
parent0e13d397ab565591037e2402dc1b09e02e4c1c49
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