summaryrefslogtreecommitdiff
path: root/lib/strto.c
AgeCommit message (Collapse)Author
2017-09-14lib: strto: fix incorrect handling of specified baseRob Clark
The strto functions should honor the specified base (if non-zero) rather than permitting a hex or octal string when the user wanted (for example) base 10. This has been fixed somewhere along the way in the upstream linux kernel src tree, at some point after these was copied in to u-boot. And also in a way that duplicates less code. So port _parse_integer_fixup_radix() to u-boot. Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-10-11Fix return value in trailing_strtoln()Simon Glass
This function should return -1 if there is no trailing integer in the string. Instead it returns 0. Fix it by checking for this condition at the start. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-12-13lib: split out strtoxxxx functions out of vsprintf.cSjoerd Simons
To allow the various string to number conversion functions to be used when using tiny-printf,split them out into their own file which gets build regardless of what printf implementation is used. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>