)\r
{\r
UINTN Index;\r
- for (Index = 0; Index < sizeof (mMemoryTypeString) / sizeof (mMemoryTypeString[0]); Index++) {\r
+ for (Index = 0; Index < ARRAY_SIZE (mMemoryTypeString); Index++) {\r
if (mMemoryTypeString[Index].MemoryType == MemoryType) {\r
return mMemoryTypeString[Index].MemoryTypeStr;\r
}\r
CHAR8 **ActionString;\r
\r
ActionString = mSmmActionString;\r
- ActionStringCount = sizeof (mSmmActionString) / sizeof (mSmmActionString[0]);\r
+ ActionStringCount = ARRAY_SIZE (mSmmActionString);\r
\r
if ((UINTN) (UINT32) Action < ActionStringCount) {\r
return ActionString[Action];\r
}\r
- for (Index = 0; Index < sizeof (mExtActionString) / sizeof (mExtActionString[0]); Index++) {\r
+ for (Index = 0; Index < ARRAY_SIZE (mExtActionString); Index++) {\r
if (mExtActionString[Index].Action == Action) {\r
return mExtActionString[Index].String;\r
}\r