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:
@@ -357,7 +357,7 @@ SetupLinuxMemmap (
|
||||
LastE820->size += EFI_PAGES_TO_SIZE ((UINTN) MemoryMap->NumberOfPages);
|
||||
LastEndAddr += EFI_PAGES_TO_SIZE ((UINTN) MemoryMap->NumberOfPages);
|
||||
} else {
|
||||
if (E820EntryCount >= (sizeof (Bp->e820_map) / sizeof (Bp->e820_map[0]))) {
|
||||
if (E820EntryCount >= ARRAY_SIZE (Bp->e820_map)) {
|
||||
break;
|
||||
}
|
||||
E820->type = (UINT32) E820Type;
|
||||
|
Reference in New Issue
Block a user