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:
@@ -567,7 +567,7 @@ LocateSerialIo (
|
||||
Vendor.Header.Type = MESSAGING_DEVICE_PATH;
|
||||
Vendor.Header.SubType = MSG_VENDOR_DP;
|
||||
|
||||
for (Index2 = 0; Index2 < (sizeof (TerminalTypeGuid) / sizeof (TerminalTypeGuid[0])); Index2++) {
|
||||
for (Index2 = 0; Index2 < (ARRAY_SIZE (TerminalTypeGuid)); Index2++) {
|
||||
CopyMem (&Vendor.Guid, &TerminalTypeGuid[Index2], sizeof (EFI_GUID));
|
||||
SetDevicePathNodeLength (&Vendor.Header, sizeof (VENDOR_DEVICE_PATH));
|
||||
NewDevicePath = AppendDevicePathNode (
|
||||
@@ -1131,21 +1131,21 @@ GetTerminalAttribute (
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (AttributeIndex = 0; AttributeIndex < sizeof (DataBitsList) / sizeof (DataBitsList[0]); AttributeIndex++) {
|
||||
for (AttributeIndex = 0; AttributeIndex < ARRAY_SIZE (DataBitsList); AttributeIndex++) {
|
||||
if (NewTerminalContext->DataBits == (UINT64) (DataBitsList[AttributeIndex].Value)) {
|
||||
NewTerminalContext->DataBitsIndex = AttributeIndex;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (AttributeIndex = 0; AttributeIndex < sizeof (ParityList) / sizeof (ParityList[0]); AttributeIndex++) {
|
||||
for (AttributeIndex = 0; AttributeIndex < ARRAY_SIZE (ParityList); AttributeIndex++) {
|
||||
if (NewTerminalContext->Parity == (UINT64) (ParityList[AttributeIndex].Value)) {
|
||||
NewTerminalContext->ParityIndex = AttributeIndex;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (AttributeIndex = 0; AttributeIndex < sizeof (StopBitsList) / sizeof (StopBitsList[0]); AttributeIndex++) {
|
||||
for (AttributeIndex = 0; AttributeIndex < ARRAY_SIZE (StopBitsList); AttributeIndex++) {
|
||||
if (NewTerminalContext->StopBits == (UINT64) (StopBitsList[AttributeIndex].Value)) {
|
||||
NewTerminalContext->StopBitsIndex = AttributeIndex;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user