From 5279457b5b9715d52c93c28eaccfcbd9b27d9137 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Wed, 26 Oct 2016 19:31:18 +0200 Subject: Vlv2TbltDevicePkg/PlatformPei: rebase to ARRAY_SIZE() Cc: David Wei Cc: Tim He Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: "Guo, Mang" Reviewed-by: Jordan Justen --- Vlv2TbltDevicePkg/PlatformPei/BootMode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Vlv2TbltDevicePkg') diff --git a/Vlv2TbltDevicePkg/PlatformPei/BootMode.c b/Vlv2TbltDevicePkg/PlatformPei/BootMode.c index 4d933a09db..95be1c0f28 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) { // -- cgit v1.2.3