diff mbox

[edk2,45/47] Vlv2TbltDevicePkg/PlatformPei: rebase to ARRAY_SIZE()

Message ID 20161026190504.9888-46-lersek@redhat.com
State Accepted
Commit 5279457b5b9715d52c93c28eaccfcbd9b27d9137
Headers show

Commit Message

Laszlo Ersek Oct. 26, 2016, 7:05 p.m. UTC
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>

---
 Vlv2TbltDevicePkg/PlatformPei/BootMode.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.9.2


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/Vlv2TbltDevicePkg/PlatformPei/BootMode.c b/Vlv2TbltDevicePkg/PlatformPei/BootMode.c
index 4d933a09db0e..95be1c0f2851 100644
--- a/Vlv2TbltDevicePkg/PlatformPei/BootMode.c
+++ b/Vlv2TbltDevicePkg/PlatformPei/BootMode.c
@@ -372,13 +372,13 @@  PrioritizeBootMode (
   // Find the position of the current boot mode in our priority array
   //
   for ( CurrentIndex = 0;
-        CurrentIndex < sizeof (mBootModePriority) / sizeof (mBootModePriority[0]);
+        CurrentIndex < ARRAY_SIZE (mBootModePriority);
         CurrentIndex++) {
     if (mBootModePriority[CurrentIndex] == *CurrentBootMode) {
       break;
     }
   }
-  if (CurrentIndex >= sizeof (mBootModePriority) / sizeof (mBootModePriority[0])) {
+  if (CurrentIndex >= ARRAY_SIZE (mBootModePriority)) {
     return EFI_NOT_FOUND;
   }
 
@@ -386,7 +386,7 @@  PrioritizeBootMode (
   // Find the position of the new boot mode in our priority array
   //
   for ( NewIndex = 0;
-        NewIndex < sizeof (mBootModePriority) / sizeof (mBootModePriority[0]);
+        NewIndex < ARRAY_SIZE (mBootModePriority);
         NewIndex++) {
     if (mBootModePriority[NewIndex] == NewBootMode) {
       //