summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2016-10-26 19:07:35 +0200
committerLaszlo Ersek <lersek@redhat.com>2016-10-27 11:10:56 +0200
commitfe69b398700860e718baa01eb4c76c338ea5f9e1 (patch)
tree15e4a3085352e66381877267a406a8034a55c9a5
parentf0209935adfc0af448574eca7808691df36c8ea4 (diff)
downloaddevice_linaro_bootloader_edk2-fe69b398700860e718baa01eb4c76c338ea5f9e1.tar.gz
device_linaro_bootloader_edk2-fe69b398700860e718baa01eb4c76c338ea5f9e1.tar.bz2
device_linaro_bootloader_edk2-fe69b398700860e718baa01eb4c76c338ea5f9e1.zip
MdeModulePkg/VarCheckHiiLib: 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>
-rw-r--r--MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.c4
-rw-r--r--MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLibNullClass.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.c b/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.c
index 5cb056f35..f018c87ba 100644
--- a/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.c
+++ b/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.c
@@ -57,7 +57,7 @@ IfrOpCodeToStr (
)
{
UINTN Index;
- for (Index = 0; Index < sizeof (mIfrOpCodeStringTable) / sizeof (mIfrOpCodeStringTable[0]); Index++) {
+ for (Index = 0; Index < ARRAY_SIZE (mIfrOpCodeStringTable); Index++) {
if (mIfrOpCodeStringTable[Index].HiiOpCode == IfrOpCode) {
return mIfrOpCodeStringTable[Index].HiiOpCodeStr;
}
@@ -96,7 +96,7 @@ HiiPackageTypeToStr (
)
{
UINTN Index;
- for (Index = 0; Index < sizeof (mPackageTypeStringTable) / sizeof (mPackageTypeStringTable[0]); Index++) {
+ for (Index = 0; Index < ARRAY_SIZE (mPackageTypeStringTable); Index++) {
if (mPackageTypeStringTable[Index].PackageType == PackageType) {
return mPackageTypeStringTable[Index].PackageTypeStr;
}
diff --git a/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLibNullClass.c b/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLibNullClass.c
index 3afa7962a..b9ca90849 100644
--- a/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLibNullClass.c
+++ b/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLibNullClass.c
@@ -318,7 +318,7 @@ HiiOpCodeToStr (
)
{
UINTN Index;
- for (Index = 0; Index < sizeof (mHiiOpCodeStringTable) / sizeof (mHiiOpCodeStringTable[0]); Index++) {
+ for (Index = 0; Index < ARRAY_SIZE (mHiiOpCodeStringTable); Index++) {
if (mHiiOpCodeStringTable[Index].HiiOpCode == HiiOpCode) {
return mHiiOpCodeStringTable[Index].HiiOpCodeStr;
}