From: Lennart Poettering Date: Thu, 22 Aug 2024 16:20:20 +0000 (+0200) Subject: boot: use MAX() where appropriate X-Git-Tag: v257-rc1~647 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=167808c6fc06e3c78512477a8f3fab35a8b273af;p=thirdparty%2Fsystemd.git boot: use MAX() where appropriate --- diff --git a/src/boot/efi/linux_x86.c b/src/boot/efi/linux_x86.c index 369752e3ea9..ddae4d160a1 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);