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>
UINT8 CodeType\r
)\r
{\r
- if (CodeType >= sizeof (mCodeTypeStr) / sizeof (*mCodeTypeStr)) {\r
- CodeType = sizeof (mCodeTypeStr) / sizeof (*mCodeTypeStr) - 1;\r
+ if (CodeType >= ARRAY_SIZE (mCodeTypeStr)) {\r
+ CodeType = ARRAY_SIZE (mCodeTypeStr) - 1;\r
}\r
return mCodeTypeStr[CodeType];\r
}\r
IfrParse2A\r
},\r
};\r
-#define PARSE_TABLE_ENTRIES (sizeof (mIfrParseTable) / sizeof (mIfrParseTable[0]))\r
+#define PARSE_TABLE_ENTRIES (ARRAY_SIZE (mIfrParseTable))\r
\r
static\r
STATUS\r