Vlv2TbltDevicePkg/PlatformPei: rebase to ARRAY_SIZE()
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>
This commit is contained in:
@@ -372,13 +372,13 @@ PrioritizeBootMode (
|
||||
PrioritizeBootMode (
|
||||
IN OUT EFI_BOOT_MODE *CurrentBootMode,
|
||||
IN EFI_BOOT_MODE NewBootMode
|
||||
)
|
||||
)
|
||||
{
|
||||
UINT32 CurrentIndex;
|
||||
UINT32 NewIndex;
|
||||
|
||||
//
|
||||
// Find the position of the current boot mode in our priority array
|
||||
// Find the position of the current boot mode in our priority array
|
||||
//
|
||||
for ( CurrentIndex = 0;
|
||||
CurrentIndex < ARRAY_SIZE (mBootModePriority);
|
||||
@@ -386,7 +386,7 @@ PrioritizeBootMode (
|
||||
if (mBootModePriority[CurrentIndex] == *CurrentBootMode) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CurrentIndex >= ARRAY_SIZE (mBootModePriority)) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
Reference in New Issue
Block a user