]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c
MdeModulePkg/Core/PiSmmCore: rebase to ARRAY_SIZE()
[mirror_edk2.git] / MdeModulePkg / Core / PiSmmCore / SmramProfileRecord.c
index 93585f199df9a5ca67d05258ef805fdce01c3069..d983cefbb3dc18b97db0084a3c8981717efa41f3 100644 (file)
@@ -2670,7 +2670,7 @@ ProfileMemoryTypeToStr (
   )\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
@@ -2697,12 +2697,12 @@ ProfileActionToStr (
   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