diff options
author | Laszlo Ersek <lersek@redhat.com> | 2016-10-26 19:31:18 +0200 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2016-10-27 11:15:21 +0200 |
commit | 5279457b5b9715d52c93c28eaccfcbd9b27d9137 (patch) | |
tree | 6636c698cac7dacba3eae4dabc4c34c8a02b5968 | |
parent | 800355c4b3336b8af5c0c3c101be8a3892852029 (diff) | |
download | edk2-platforms-5279457b5b9715d52c93c28eaccfcbd9b27d9137.tar.xz |
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>
-rw-r--r-- | Vlv2TbltDevicePkg/PlatformPei/BootMode.c | 6 |
1 files changed, 3 insertions, 3 deletions
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) {
//
|