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>
This commit is contained in:
Laszlo Ersek 2016-10-26 19:07:35 +02:00
parent f0209935ad
commit fe69b39870
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}

View File

@ -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;
}