BaseTools/DevicePath: use explicit 64-bit number parsing routines
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 29 Nov 2018 12:18:13 +0000 (13:18 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 5 Dec 2018 08:03:23 +0000 (09:03 +0100)
Replace invocations of StrHexToUintn() with StrHexToUint64(), so
that we can drop the former.

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>
BaseTools/Source/C/DevicePath/DevicePathFromText.c

index 555efa1..6151926 100644 (file)
@@ -520,7 +520,7 @@ EisaIdFromText (
   return (((Text[0] - 'A' + 1) & 0x1f) << 10)\r
        + (((Text[1] - 'A' + 1) & 0x1f) <<  5)\r
        + (((Text[2] - 'A' + 1) & 0x1f) <<  0)\r
-       + (UINT32) (StrHexToUintn (&Text[3]) << 16)\r
+       + (UINT32) (StrHexToUint64 (&Text[3]) << 16)\r
        ;\r
 }\r
 \r
@@ -1506,7 +1506,7 @@ DevPathFromTextNVMe (
 \r
   Index = sizeof (Nvme->NamespaceUuid) / sizeof (UINT8);\r
   while (Index-- != 0) {\r
-    Uuid[Index] = (UINT8) StrHexToUintn (SplitStr (&NamespaceUuidStr, L'-'));\r
+    Uuid[Index] = (UINT8) StrHexToUint64 (SplitStr (&NamespaceUuidStr, L'-'));\r
   }\r
 \r
   return (EFI_DEVICE_PATH_PROTOCOL *) Nvme;\r