From 167808c6fc06e3c78512477a8f3fab35a8b273af Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 22 Aug 2024 18:20:20 +0200 Subject: [PATCH] boot: use MAX() where appropriate --- src/boot/efi/linux_x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/boot/efi/linux_x86.c b/src/boot/efi/linux_x86.c index 369752e3ea..ddae4d160a 100644 --- a/src/boot/efi/linux_x86.c +++ b/src/boot/efi/linux_x86.c @@ -164,7 +164,7 @@ EFI_STATUS linux_exec_efi_handover( linux_relocated = xmalloc_pages( AllocateMaxAddress, EfiLoaderCode, - EFI_SIZE_TO_PAGES(kernel_size_in_memory > kernel->iov_len ? kernel_size_in_memory : kernel->iov_len), + EFI_SIZE_TO_PAGES(MAX(kernel_size_in_memory, kernel->iov_len)), UINT32_MAX); linux_buffer = memcpy( PHYSICAL_ADDRESS_TO_POINTER(linux_relocated.addr), kernel->iov_base, kernel->iov_len); -- 2.25.1