]> 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>
Mon, 5 Sep 2011 07:02:30 +0000 (17:02 +1000)
commit94453d90c8ce50b52dddb69d5975cc5b4ee6489e
treec89aae7b4e2083afc4d174f697f34aa52272dc5e
parent4423c8f0c091f63721dd948c278244fe6bc31079
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