diff options
author | Laszlo Ersek <lersek@redhat.com> | 2016-10-26 19:02:52 +0200 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2016-10-27 11:10:56 +0200 |
commit | a031a53fa499f7be8a71d0c76134de6392495548 (patch) | |
tree | 10146211be564f60b1b7c61feb8f2552d08848b5 /MdeModulePkg | |
parent | 6eeeb2882637f081bf4e44bdbfb599f4f3b1ba84 (diff) | |
download | edk2-platforms-a031a53fa499f7be8a71d0c76134de6392495548.tar.xz |
MdeModulePkg/BootManagerUiLib: rebase to ARRAY_SIZE()
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Feng Tian <feng.tian@Intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Library/BootManagerUiLib/BootManager.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Library/BootManagerUiLib/BootManager.c b/MdeModulePkg/Library/BootManagerUiLib/BootManager.c index cab38ca280..bf872f867e 100644 --- a/MdeModulePkg/Library/BootManagerUiLib/BootManager.c +++ b/MdeModulePkg/Library/BootManagerUiLib/BootManager.c @@ -343,7 +343,7 @@ GroupMultipleLegacyBootOption4SameType ( // Legacy Boot Option
//
DEBUG ((EFI_D_ERROR, "[BootManagerDxe] ==== Find Legacy Boot Option 0x%x! ==== \n", Index));
- ASSERT ((((BBS_BBS_DEVICE_PATH *) BootOption.FilePath)->DeviceType & 0xF) < sizeof (DeviceTypeIndex) / sizeof (DeviceTypeIndex[0]));
+ ASSERT ((((BBS_BBS_DEVICE_PATH *) BootOption.FilePath)->DeviceType & 0xF) < ARRAY_SIZE (DeviceTypeIndex));
NextIndex = &DeviceTypeIndex[((BBS_BBS_DEVICE_PATH *) BootOption.FilePath)->DeviceType & 0xF];
if (*NextIndex == (UINTN) -1) {
@@ -362,7 +362,7 @@ GroupMultipleLegacyBootOption4SameType ( //
// Update the DeviceTypeIndex array to reflect the right shift operation
//
- for (DeviceIndex = 0; DeviceIndex < sizeof (DeviceTypeIndex) / sizeof (DeviceTypeIndex[0]); DeviceIndex++) {
+ for (DeviceIndex = 0; DeviceIndex < ARRAY_SIZE (DeviceTypeIndex); DeviceIndex++) {
if (DeviceTypeIndex[DeviceIndex] != (UINTN) -1 && DeviceTypeIndex[DeviceIndex] >= *NextIndex) {
DeviceTypeIndex[DeviceIndex]++;
}
@@ -526,7 +526,7 @@ UpdateBootManager ( HiiHandle,
0,
mDeviceTypeStr[
- MIN (DeviceType & 0xF, sizeof (mDeviceTypeStr) / sizeof (mDeviceTypeStr[0]) - 1)
+ MIN (DeviceType & 0xF, ARRAY_SIZE (mDeviceTypeStr) - 1)
],
NULL
);
|