]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/MemoryProfileInfo: rebase to ARRAY_SIZE()
authorLaszlo Ersek <lersek@redhat.com>
Wed, 26 Oct 2016 16:51:43 +0000 (18:51 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Thu, 27 Oct 2016 09:10:55 +0000 (11:10 +0200)
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>
MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c

index 14e89347c6db5fa366e90928bdc794edb5841953..338eb8191fa2ce4600720bd45dfc6fda4c4ed918 100644 (file)
@@ -343,16 +343,16 @@ ProfileActionToStr (
 \r
   if (IsForSmm) {\r
     ActionString = mSmmActionString;\r
-    ActionStringCount = sizeof (mSmmActionString) / sizeof (mSmmActionString[0]);\r
+    ActionStringCount = ARRAY_SIZE (mSmmActionString);\r
   } else {\r
     ActionString = mActionString;\r
-    ActionStringCount = sizeof (mActionString) / sizeof (mActionString[0]);\r
+    ActionStringCount = ARRAY_SIZE (mActionString);\r
   }\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