mirror of https://github.com/acidanthera/audk.git
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:
parent
f0209935ad
commit
fe69b39870
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue