]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c
IntelFrameworkModulePkg/BdsDxe: rebase to ARRAY_SIZE()
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / BootMaint / BBSsupport.c
index 6a0b525f1581eafd6e8923929b4767413e6e0e72..2ef9cf13ebb8c9cf0a56a49bd8331f4bb83482af 100644 (file)
@@ -206,7 +206,7 @@ GroupMultipleLegacyBootOption4SameType (
       //\r
       // Legacy Boot Option\r
       //\r
-      ASSERT ((((BBS_BBS_DEVICE_PATH *) BootOption->DevicePath)->DeviceType & 0xF) < sizeof (DeviceTypeIndex) / sizeof (DeviceTypeIndex[0]));\r
+      ASSERT ((((BBS_BBS_DEVICE_PATH *) BootOption->DevicePath)->DeviceType & 0xF) < ARRAY_SIZE (DeviceTypeIndex));\r
       NextIndex = &DeviceTypeIndex[((BBS_BBS_DEVICE_PATH *) BootOption->DevicePath)->DeviceType & 0xF];\r
 \r
       if (*NextIndex == (UINTN) -1) {\r
@@ -225,7 +225,7 @@ GroupMultipleLegacyBootOption4SameType (
         //\r
         // Update the DeviceTypeIndex array to reflect the right shift operation\r
         //\r
-        for (DeviceIndex = 0; DeviceIndex < sizeof (DeviceTypeIndex) / sizeof (DeviceTypeIndex[0]); DeviceIndex++) {\r
+        for (DeviceIndex = 0; DeviceIndex < ARRAY_SIZE (DeviceTypeIndex); DeviceIndex++) {\r
           if (DeviceTypeIndex[DeviceIndex] != (UINTN) -1 && DeviceTypeIndex[DeviceIndex] >= *NextIndex) {\r
             DeviceTypeIndex[DeviceIndex]++;\r
           }\r