[U-Boot] [PATCH 1/1] cmd: unzip: use correct format code

Heinrich Schuchardt xypron.glpk at gmx.de
Sun Jan 6 11:34:16 UTC 2019


src_len is defined as unsigned long. So use %lu for printf().

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 cmd/unzip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/unzip.c b/cmd/unzip.c
index f7aabf72d1..6c0f97cb4b 100644
--- a/cmd/unzip.c
+++ b/cmd/unzip.c
@@ -27,7 +27,7 @@ static int do_unzip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	if (gunzip((void *) dst, dst_len, (void *) src, &src_len) != 0)
 		return 1;
 
-	printf("Uncompressed size: %ld = 0x%lX\n", src_len, src_len);
+	printf("Uncompressed size: %lu = 0x%lX\n", src_len, src_len);
 	env_set_hex("filesize", src_len);
 
 	return 0;
-- 
2.20.1



More information about the U-Boot mailing list