diff options
-rw-r--r-- | EdkCompatibilityPkg/Sample/Tools/Source/EfiRom/EfiRom.c | 4 | ||||
-rw-r--r-- | EdkCompatibilityPkg/Sample/Tools/Source/HiiPack/IfrParse.c | 2 |
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
|