mirror of https://github.com/acidanthera/audk.git
EdkCompatibilityPkg/Sample/Tools: rebase to ARRAY_SIZE()
Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
parent
abcdd98be3
commit
bd79132f3e
|
@ -397,8 +397,8 @@ GetCodeTypeStr (
|
||||||
UINT8 CodeType
|
UINT8 CodeType
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (CodeType >= sizeof (mCodeTypeStr) / sizeof (*mCodeTypeStr)) {
|
if (CodeType >= ARRAY_SIZE (mCodeTypeStr)) {
|
||||||
CodeType = sizeof (mCodeTypeStr) / sizeof (*mCodeTypeStr) - 1;
|
CodeType = ARRAY_SIZE (mCodeTypeStr) - 1;
|
||||||
}
|
}
|
||||||
return mCodeTypeStr[CodeType];
|
return mCodeTypeStr[CodeType];
|
||||||
}
|
}
|
||||||
|
|
|
@ -470,7 +470,7 @@ static const IFR_PARSE_TABLE_ENTRY mIfrParseTable[] = {
|
||||||
IfrParse2A
|
IfrParse2A
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
#define PARSE_TABLE_ENTRIES (sizeof (mIfrParseTable) / sizeof (mIfrParseTable[0]))
|
#define PARSE_TABLE_ENTRIES (ARRAY_SIZE (mIfrParseTable))
|
||||||
|
|
||||||
static
|
static
|
||||||
STATUS
|
STATUS
|
||||||
|
|
Loading…
Reference in New Issue