MdeModulePkg/BootMaintenanceManagerUiLib: 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:00:44 +02:00
parent 8368951f1b
commit 6eeeb28826
4 changed files with 15 additions and 15 deletions

View File

@@ -736,7 +736,7 @@ UpdateConModePage (
//
UnicodeValueToString (ModeString, 0, Col, 0);
PStr = &ModeString[0];
StrnCatS (PStr, sizeof (ModeString) / sizeof (ModeString[0]), L" x ", StrLen(L" x ") + 1);
StrnCatS (PStr, ARRAY_SIZE (ModeString), L" x ", StrLen(L" x ") + 1);
PStr = PStr + StrLen (PStr);
UnicodeValueToString (PStr , 0, Row, 0);
@@ -847,7 +847,7 @@ UpdateTerminalPage (
OptionsOpCodeHandle = HiiAllocateOpCodeHandle ();
ASSERT (OptionsOpCodeHandle != NULL);
for (Index = 0; Index < sizeof (DataBitsList) / sizeof (DataBitsList[0]); Index++) {
for (Index = 0; Index < ARRAY_SIZE (DataBitsList); Index++) {
CheckFlags = 0;
if (DataBitsList[Index].Value == 8) {
@@ -880,7 +880,7 @@ UpdateTerminalPage (
OptionsOpCodeHandle = HiiAllocateOpCodeHandle ();
ASSERT (OptionsOpCodeHandle != NULL);
for (Index = 0; Index < sizeof (ParityList) / sizeof (ParityList[0]); Index++) {
for (Index = 0; Index < ARRAY_SIZE (ParityList); Index++) {
CheckFlags = 0;
if (ParityList[Index].Value == NoParity) {
CheckFlags |= EFI_IFR_OPTION_DEFAULT;
@@ -912,7 +912,7 @@ UpdateTerminalPage (
OptionsOpCodeHandle = HiiAllocateOpCodeHandle ();
ASSERT (OptionsOpCodeHandle != NULL);
for (Index = 0; Index < sizeof (StopBitsList) / sizeof (StopBitsList[0]); Index++) {
for (Index = 0; Index < ARRAY_SIZE (StopBitsList); Index++) {
CheckFlags = 0;
if (StopBitsList[Index].Value == OneStopBit) {
CheckFlags |= EFI_IFR_OPTION_DEFAULT;
@@ -944,7 +944,7 @@ UpdateTerminalPage (
OptionsOpCodeHandle = HiiAllocateOpCodeHandle ();
ASSERT (OptionsOpCodeHandle != NULL);
for (Index = 0; Index < sizeof (TerminalType) / sizeof (TerminalType[0]); Index++) {
for (Index = 0; Index < ARRAY_SIZE (TerminalType); Index++) {
CheckFlags = 0;
if (Index == 0) {
CheckFlags |= EFI_IFR_OPTION_DEFAULT;
@@ -976,7 +976,7 @@ UpdateTerminalPage (
OptionsOpCodeHandle = HiiAllocateOpCodeHandle ();
ASSERT (OptionsOpCodeHandle != NULL);
for (Index = 0; Index < sizeof (mFlowControlType) / sizeof (mFlowControlType[0]); Index++) {
for (Index = 0; Index < ARRAY_SIZE (mFlowControlType); Index++) {
CheckFlags = 0;
if (Index == 0) {
CheckFlags |= EFI_IFR_OPTION_DEFAULT;