[U-Boot] [PATCH 1/1] efi_loader: use correct format string for unsigned long

Heinrich Schuchardt xypron.glpk at gmx.de
Fri Dec 22 18:16:57 UTC 2017


virt_size is of type unsigned long.
So it should be printed with %ul.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 lib/efi_loader/efi_image_loader.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/efi_loader/efi_image_loader.c b/lib/efi_loader/efi_image_loader.c
index af29cc4f04..849d7ce377 100644
--- a/lib/efi_loader/efi_image_loader.c
+++ b/lib/efi_loader/efi_image_loader.c
@@ -133,8 +133,8 @@ void *efi_load_pe(void *efi, struct efi_loaded_image *loaded_image_info)
 		image_size = opt->SizeOfImage;
 		efi_reloc = efi_alloc(virt_size, EFI_LOADER_DATA);
 		if (!efi_reloc) {
-			printf("%s: Could not allocate %ld bytes\n",
-				__func__, virt_size);
+			printf("%s: Could not allocate %lu bytes\n",
+			       __func__, virt_size);
 			return NULL;
 		}
 		entry = efi_reloc + opt->AddressOfEntryPoint;
@@ -147,8 +147,8 @@ void *efi_load_pe(void *efi, struct efi_loaded_image *loaded_image_info)
 		image_size = opt->SizeOfImage;
 		efi_reloc = efi_alloc(virt_size, EFI_LOADER_DATA);
 		if (!efi_reloc) {
-			printf("%s: Could not allocate %ld bytes\n",
-				__func__, virt_size);
+			printf("%s: Could not allocate %lu bytes\n",
+			       __func__, virt_size);
 			return NULL;
 		}
 		entry = efi_reloc + opt->AddressOfEntryPoint;
-- 
2.15.1



More information about the U-Boot mailing list