]> git.proxmox.com Git - mirror_edk2.git/commit - MdePkg/Include/Library/BaseLib.h
MdePkg/BaseLib: Enhance the return value for string to uint functions
authorHao Wu <hao.a.wu@intel.com>
Wed, 14 Dec 2016 03:04:48 +0000 (11:04 +0800)
committerHao Wu <hao.a.wu@intel.com>
Mon, 9 Jan 2017 05:59:26 +0000 (13:59 +0800)
commitea2e09218647132e62ac07d54ca2ea8a50617cc7
tree6f741b3b661b9b17d1ad39bbe2e4d2823edf2d1b
parentd8af3301a648df3b4eea6933a46f56f1853367d6
MdePkg/BaseLib: Enhance the return value for string to uint functions

For the following 8 APIs in MdePkg/BaseLib:
[Ascii]StrDecimalToUintn
[Ascii]StrDecimalToUint64
[Ascii]StrHexToUintn
[Ascii]StrHexToUint64

They will ASSERT for DEBUG build when the input string exceeds the range
of UINTN/UINT64. However, for RELEASE build, incorrect value will be
returned.

This commit refines those APIs to direcly call their enhanced counterparts
(with trailing 'S' in API names) so as to remove those exceed-range ASSERT
checks and to make those APIs to return MAX_UINTN/MAX_UINT64 instead.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
MdePkg/Include/Library/BaseLib.h
MdePkg/Library/BaseLib/String.c