OvmfPkg: Make more use of ARRAY_SIZE()
Convert the remaining pieces to make the code shorter and more readable. Cc: Justen Jordan <jordan.l.justen@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> [lersek@redhat.com: tweak subject line] Signed-off-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
@@ -419,9 +419,7 @@ PciHostBridgeResourceConflict (
|
||||
DEBUG ((EFI_D_ERROR, "RootBridge[%d]:\n", RootBridgeIndex++));
|
||||
for (; Descriptor->Desc == ACPI_ADDRESS_SPACE_DESCRIPTOR; Descriptor++) {
|
||||
ASSERT (Descriptor->ResType <
|
||||
(sizeof (mPciHostBridgeLibAcpiAddressSpaceTypeStr) /
|
||||
sizeof (mPciHostBridgeLibAcpiAddressSpaceTypeStr[0])
|
||||
)
|
||||
ARRAY_SIZE (mPciHostBridgeLibAcpiAddressSpaceTypeStr)
|
||||
);
|
||||
DEBUG ((EFI_D_ERROR, " %s: Length/Alignment = 0x%lx / 0x%lx\n",
|
||||
mPciHostBridgeLibAcpiAddressSpaceTypeStr[Descriptor->ResType],
|
||||
|
Reference in New Issue
Block a user