diff options
author | Laszlo Ersek <lersek@redhat.com> | 2016-10-26 19:07:35 +0200 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2016-10-27 11:10:56 +0200 |
commit | fe69b398700860e718baa01eb4c76c338ea5f9e1 (patch) | |
tree | 15e4a3085352e66381877267a406a8034a55c9a5 /MdeModulePkg | |
parent | f0209935adfc0af448574eca7808691df36c8ea4 (diff) | |
download | edk2-platforms-fe69b398700860e718baa01eb4c76c338ea5f9e1.tar.xz |
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>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.c | 4 | ||||
-rw-r--r-- | MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLibNullClass.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.c b/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.c index 5cb056f351..f018c87ba1 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 3afa7962aa..b9ca908491 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;
}
|