summaryrefslogtreecommitdiffstats
path: root/EdkCompatibilityPkg
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2016-10-26 18:31:20 +0200
committerLaszlo Ersek <lersek@redhat.com>2016-10-27 11:10:54 +0200
commitbd79132f3e715b41ebc1732238b1497a6fab833a (patch)
tree87b714b211c9fd1665fccb14fea7b0a69bbcbe7b /EdkCompatibilityPkg
parentabcdd98be3ea23843c23808bd6433fdcad1a0eb3 (diff)
downloadedk2-bd79132f3e715b41ebc1732238b1497a6fab833a.tar.gz
edk2-bd79132f3e715b41ebc1732238b1497a6fab833a.tar.bz2
edk2-bd79132f3e715b41ebc1732238b1497a6fab833a.zip
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>
Diffstat (limited to 'EdkCompatibilityPkg')
-rw-r--r--EdkCompatibilityPkg/Sample/Tools/Source/EfiRom/EfiRom.c4
-rw-r--r--EdkCompatibilityPkg/Sample/Tools/Source/HiiPack/IfrParse.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/EdkCompatibilityPkg/Sample/Tools/Source/EfiRom/EfiRom.c b/EdkCompatibilityPkg/Sample/Tools/Source/EfiRom/EfiRom.c
index cf8efc86e1..f787ae81c2 100644
--- a/EdkCompatibilityPkg/Sample/Tools/Source/EfiRom/EfiRom.c
+++ b/EdkCompatibilityPkg/Sample/Tools/Source/EfiRom/EfiRom.c
@@ -397,8 +397,8 @@ GetCodeTypeStr (
UINT8 CodeType
)
{
- if (CodeType >= sizeof (mCodeTypeStr) / sizeof (*mCodeTypeStr)) {
- CodeType = sizeof (mCodeTypeStr) / sizeof (*mCodeTypeStr) - 1;
+ if (CodeType >= ARRAY_SIZE (mCodeTypeStr)) {
+ CodeType = ARRAY_SIZE (mCodeTypeStr) - 1;
}
return mCodeTypeStr[CodeType];
}
diff --git a/EdkCompatibilityPkg/Sample/Tools/Source/HiiPack/IfrParse.c b/EdkCompatibilityPkg/Sample/Tools/Source/HiiPack/IfrParse.c
index e69af5c259..e60a2d9eeb 100644
--- a/EdkCompatibilityPkg/Sample/Tools/Source/HiiPack/IfrParse.c
+++ b/EdkCompatibilityPkg/Sample/Tools/Source/HiiPack/IfrParse.c
@@ -470,7 +470,7 @@ static const IFR_PARSE_TABLE_ENTRY mIfrParseTable[] = {
IfrParse2A
},
};
-#define PARSE_TABLE_ENTRIES (sizeof (mIfrParseTable) / sizeof (mIfrParseTable[0]))
+#define PARSE_TABLE_ENTRIES (ARRAY_SIZE (mIfrParseTable))
static
STATUS