Cc: David Wei <david.wei@intel.com>
Cc: Tim He <tim.he@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: "Guo, Mang" <mang.guo@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
// Find the position of the current boot mode in our priority array\r
//\r
for ( CurrentIndex = 0;\r
- CurrentIndex < sizeof (mBootModePriority) / sizeof (mBootModePriority[0]);\r
+ CurrentIndex < ARRAY_SIZE (mBootModePriority);\r
CurrentIndex++) {\r
if (mBootModePriority[CurrentIndex] == *CurrentBootMode) {\r
break;\r
}\r
}\r
- if (CurrentIndex >= sizeof (mBootModePriority) / sizeof (mBootModePriority[0])) {\r
+ if (CurrentIndex >= ARRAY_SIZE (mBootModePriority)) {\r
return EFI_NOT_FOUND;\r
}\r
\r
// Find the position of the new boot mode in our priority array\r
//\r
for ( NewIndex = 0;\r
- NewIndex < sizeof (mBootModePriority) / sizeof (mBootModePriority[0]);\r
+ NewIndex < ARRAY_SIZE (mBootModePriority);\r
NewIndex++) {\r
if (mBootModePriority[NewIndex] == NewBootMode) {\r
//\r