]> git.baikalelectronics.ru Git - uboot.git/commit
lib: strto: fix incorrect handling of specified base
authorRob Clark <robdclark@gmail.com>
Mon, 11 Sep 2017 20:53:08 +0000 (16:53 -0400)
committerTom Rini <trini@konsulko.com>
Fri, 15 Sep 2017 01:32:59 +0000 (21:32 -0400)
commitbb9ea750377ea58db26d4794116ffd8d9afd96da
treee17a1dfc65845bc337c3f921f3efd85a8be94500
parentd5b006065808ab62139bdccfd3ebe760af18c9dc
lib: strto: fix incorrect handling of specified base

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>
lib/strto.c