]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Vlv2TbltDevicePkg/PlatformPei: rebase to ARRAY_SIZE()
authorLaszlo Ersek <lersek@redhat.com>
Wed, 26 Oct 2016 17:31:18 +0000 (19:31 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Thu, 27 Oct 2016 09:15:21 +0000 (11:15 +0200)
Cc: David Wei <david.wei@intel.com>
Cc: Tim He <tim.he@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: "Guo, Mang" <mang.guo@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
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