// 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