// Loop to find the start PAM.\r
//\r
StartIndex = 0;\r
- for (Index = 0; Index < (sizeof(mSectionArray) / sizeof (mSectionArray[0])); Index++) {\r
+ for (Index = 0; Index < ARRAY_SIZE (mSectionArray); Index++) {\r
if ((Start >= mSectionArray[Index].Start) && (Start < (mSectionArray[Index].Start + mSectionArray[Index].Length))) {\r
StartIndex = Index;\r
break;\r
}\r
}\r
- ASSERT (Index < (sizeof(mSectionArray) / sizeof (mSectionArray[0])));\r
+ ASSERT (Index < ARRAY_SIZE (mSectionArray));\r
\r
//\r
// Program PAM until end PAM is encountered\r
//\r
- for (Index = StartIndex; Index < (sizeof(mSectionArray) / sizeof (mSectionArray[0])); Index++) {\r
+ for (Index = StartIndex; Index < ARRAY_SIZE (mSectionArray); Index++) {\r
if (ReadEnable != NULL) {\r
if (*ReadEnable) {\r
PciOr8 (\r
break;\r
}\r
}\r
- ASSERT (Index < (sizeof(mSectionArray) / sizeof (mSectionArray[0])));\r
+ ASSERT (Index < ARRAY_SIZE (mSectionArray));\r
\r
return EFI_SUCCESS;\r
}\r