summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Library/LoadLinuxLib/Linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg/Library/LoadLinuxLib/Linux.c')
-rw-r--r--OvmfPkg/Library/LoadLinuxLib/Linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/OvmfPkg/Library/LoadLinuxLib/Linux.c b/OvmfPkg/Library/LoadLinuxLib/Linux.c
index 9c996adfbb..68d15377bf 100644
--- a/OvmfPkg/Library/LoadLinuxLib/Linux.c
+++ b/OvmfPkg/Library/LoadLinuxLib/Linux.c
@@ -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;