Skip to contentSkip to conversation

cmd: unzip: use correct format code

PATCH New Heinrich Schuchardt 2 participants 2 messages Jan 6, 2019 – Jan 16, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cmd: unzip: use correct format code

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

---
 cmd/unzip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/unzip.c +1 -1
index f7aabf72d1..6c0f97cb4b 100644
@@ -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;
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 cmd: unzip: use correct format code

Quoted 3 lines · Heinrich Schuchardt

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

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190115/f259af51/attachment.sig>