Vendor.Header.Type = MESSAGING_DEVICE_PATH;\r
Vendor.Header.SubType = MSG_VENDOR_DP;\r
\r
- for (Index2 = 0; Index2 < (sizeof (TerminalTypeGuid) / sizeof (TerminalTypeGuid[0])); Index2++) {\r
+ for (Index2 = 0; Index2 < (ARRAY_SIZE (TerminalTypeGuid)); Index2++) {\r
CopyMem (&Vendor.Guid, &TerminalTypeGuid[Index2], sizeof (EFI_GUID));\r
SetDevicePathNodeLength (&Vendor.Header, sizeof (VENDOR_DEVICE_PATH));\r
NewDevicePath = AppendDevicePathNode (\r
break;\r
}\r
}\r
- for (AttributeIndex = 0; AttributeIndex < sizeof (DataBitsList) / sizeof (DataBitsList[0]); AttributeIndex++) {\r
+ for (AttributeIndex = 0; AttributeIndex < ARRAY_SIZE (DataBitsList); AttributeIndex++) {\r
if (NewTerminalContext->DataBits == (UINT64) (DataBitsList[AttributeIndex].Value)) {\r
NewTerminalContext->DataBitsIndex = AttributeIndex;\r
break;\r
}\r
} \r
\r
- for (AttributeIndex = 0; AttributeIndex < sizeof (ParityList) / sizeof (ParityList[0]); AttributeIndex++) {\r
+ for (AttributeIndex = 0; AttributeIndex < ARRAY_SIZE (ParityList); AttributeIndex++) {\r
if (NewTerminalContext->Parity == (UINT64) (ParityList[AttributeIndex].Value)) {\r
NewTerminalContext->ParityIndex = AttributeIndex;\r
break;\r
}\r
}\r
\r
- for (AttributeIndex = 0; AttributeIndex < sizeof (StopBitsList) / sizeof (StopBitsList[0]); AttributeIndex++) {\r
+ for (AttributeIndex = 0; AttributeIndex < ARRAY_SIZE (StopBitsList); AttributeIndex++) {\r
if (NewTerminalContext->StopBits == (UINT64) (StopBitsList[AttributeIndex].Value)) {\r
NewTerminalContext->StopBitsIndex = AttributeIndex;\r
break;\r