mirror of https://github.com/acidanthera/audk.git
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:
parent
800355c4b3
commit
5279457b5b
|
@ -372,13 +372,13 @@ PrioritizeBootMode (
|
||||||
// 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;
|
for ( CurrentIndex = 0;
|
||||||
CurrentIndex < sizeof (mBootModePriority) / sizeof (mBootModePriority[0]);
|
CurrentIndex < ARRAY_SIZE (mBootModePriority);
|
||||||
CurrentIndex++) {
|
CurrentIndex++) {
|
||||||
if (mBootModePriority[CurrentIndex] == *CurrentBootMode) {
|
if (mBootModePriority[CurrentIndex] == *CurrentBootMode) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CurrentIndex >= sizeof (mBootModePriority) / sizeof (mBootModePriority[0])) {
|
if (CurrentIndex >= ARRAY_SIZE (mBootModePriority)) {
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -386,7 +386,7 @@ PrioritizeBootMode (
|
||||||
// Find the position of the new boot mode in our priority array
|
// Find the position of the new boot mode in our priority array
|
||||||
//
|
//
|
||||||
for ( NewIndex = 0;
|
for ( NewIndex = 0;
|
||||||
NewIndex < sizeof (mBootModePriority) / sizeof (mBootModePriority[0]);
|
NewIndex < ARRAY_SIZE (mBootModePriority);
|
||||||
NewIndex++) {
|
NewIndex++) {
|
||||||
if (mBootModePriority[NewIndex] == NewBootMode) {
|
if (mBootModePriority[NewIndex] == NewBootMode) {
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue