summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Application
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2016-10-26 18:51:43 +0200
committerLaszlo Ersek <lersek@redhat.com>2016-10-27 11:10:55 +0200
commit32223fd8ce00058ad94c1b9d17281564ce073db3 (patch)
tree77144982b454ac7b6af36336e306fa95307b007b /MdeModulePkg/Application
parentbdb898a50c641639d047db8095ffeb9a3c9d3d41 (diff)
downloadedk2-32223fd8ce00058ad94c1b9d17281564ce073db3.tar.gz
edk2-32223fd8ce00058ad94c1b9d17281564ce073db3.tar.bz2
edk2-32223fd8ce00058ad94c1b9d17281564ce073db3.zip
MdeModulePkg/MemoryProfileInfo: rebase to ARRAY_SIZE()
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>
Diffstat (limited to 'MdeModulePkg/Application')
-rw-r--r--MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c b/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c
index 14e89347c6..338eb8191f 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;
}