mirror of https://github.com/acidanthera/audk.git
BaseTools/CommonLib: use explicit 64-bit type in Strtoi()
Don't use the native word size string to number parsing routines, but instead, use the 64-bit one and cast to UINTN. Currently, the only user is in Source/C/DevicePath/DevicePathFromText.c which takes care to use Strtoi64 () unless it assumes the value fits in 32-bit, so this change is a no-op even on 32-bit build hosts. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
93afbd1595
commit
76e5f493d2
|
@ -2252,9 +2252,9 @@ Strtoi (
|
|||
)
|
||||
{
|
||||
if (IsHexStr (Str)) {
|
||||
return StrHexToUintn (Str);
|
||||
return (UINTN)StrHexToUint64 (Str);
|
||||
} else {
|
||||
return StrDecimalToUintn (Str);
|
||||
return (UINTN)StrDecimalToUint64 (Str);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue