diff mbox

[edk2,17/47] MdeModulePkg/MemoryProfileInfo: rebase to ARRAY_SIZE()

Message ID 20161026190504.9888-18-lersek@redhat.com
State Accepted
Commit 32223fd8ce00058ad94c1b9d17281564ce073db3
Headers show

Commit Message

Laszlo Ersek Oct. 26, 2016, 7:04 p.m. UTC
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>

---
 MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.9.2


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c b/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c
index 14e89347c6db..338eb8191fa2 100644
--- a/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c
+++ b/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c
@@ -343,16 +343,16 @@  ProfileActionToStr (
 
   if (IsForSmm) {
     ActionString = mSmmActionString;
-    ActionStringCount = sizeof (mSmmActionString) / sizeof (mSmmActionString[0]);
+    ActionStringCount = ARRAY_SIZE (mSmmActionString);
   } else {
     ActionString = mActionString;
-    ActionStringCount = sizeof (mActionString) / sizeof (mActionString[0]);
+    ActionStringCount = ARRAY_SIZE (mActionString);
   }
 
   if ((UINTN) (UINT32) Action < ActionStringCount) {
     return ActionString[Action];
   }
-  for (Index = 0; Index < sizeof (mExtActionString) / sizeof (mExtActionString[0]); Index++) {
+  for (Index = 0; Index < ARRAY_SIZE (mExtActionString); Index++) {
     if (mExtActionString[Index].Action == Action) {
       return mExtActionString[Index].String;
     }