MdeModulePkg/DisplayEngineDxe: rebase to ARRAY_SIZE()

Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Feng Tian <feng.tian@Intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Laszlo Ersek
2016-10-26 19:10:48 +02:00
parent 1a5afd7127
commit bce1d8a888
2 changed files with 5 additions and 5 deletions

View File

@@ -1070,14 +1070,14 @@ EnterCarriageReturn:
if (ValidateFail) {
UpdateStatusBar (INPUT_ERROR, TRUE);
ASSERT (Count < sizeof (PreviousNumber) / sizeof (PreviousNumber[0]));
ASSERT (Count < ARRAY_SIZE (PreviousNumber));
EditValue = PreviousNumber[Count];
break;
}
} else {
if (EditValue > Maximum) {
UpdateStatusBar (INPUT_ERROR, TRUE);
ASSERT (Count < sizeof (PreviousNumber) / sizeof (PreviousNumber[0]));
ASSERT (Count < ARRAY_SIZE (PreviousNumber));
EditValue = PreviousNumber[Count];
break;
}
@@ -1086,7 +1086,7 @@ EnterCarriageReturn:
UpdateStatusBar (INPUT_ERROR, FALSE);
Count++;
ASSERT (Count < (sizeof (PreviousNumber) / sizeof (PreviousNumber[0])));
ASSERT (Count < (ARRAY_SIZE (PreviousNumber)));
PreviousNumber[Count] = EditValue;
gST->ConOut->SetAttribute (gST->ConOut, GetHighlightTextColor ());