]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Vlv2TbltDevicePkg/PlatformPei/BootMode.c
Vlv2TbltDevicePkg/PlatformPei: rebase to ARRAY_SIZE()
[mirror_edk2.git] / Vlv2TbltDevicePkg / PlatformPei / BootMode.c
index 4d933a09db0ea19aef5d3ae90c2dc1eef8c2e7b6..95be1c0f2851a128dbb80f74c4ee9fe252a2f5ab 100644 (file)
@@ -372,13 +372,13 @@ PrioritizeBootMode (
   // Find the position of the current boot mode in our priority array\r
   //\r
   for ( CurrentIndex = 0;\r
-        CurrentIndex < sizeof (mBootModePriority) / sizeof (mBootModePriority[0]);\r
+        CurrentIndex < ARRAY_SIZE (mBootModePriority);\r
         CurrentIndex++) {\r
     if (mBootModePriority[CurrentIndex] == *CurrentBootMode) {\r
       break;\r
     }\r
   }\r
-  if (CurrentIndex >= sizeof (mBootModePriority) / sizeof (mBootModePriority[0])) {\r
+  if (CurrentIndex >= ARRAY_SIZE (mBootModePriority)) {\r
     return EFI_NOT_FOUND;\r
   }\r
 \r
@@ -386,7 +386,7 @@ PrioritizeBootMode (
   // Find the position of the new boot mode in our priority array\r
   //\r
   for ( NewIndex = 0;\r
-        NewIndex < sizeof (mBootModePriority) / sizeof (mBootModePriority[0]);\r
+        NewIndex < ARRAY_SIZE (mBootModePriority);\r
         NewIndex++) {\r
     if (mBootModePriority[NewIndex] == NewBootMode) {\r
       //\r