Skip to contentSkip to conversation

cmd: zip: 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: zip: use correct format code

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

---
 cmd/zip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/zip.c +1 -1
index d105d84e38..6b429ff285 100644
@@ -28,7 +28,7 @@ static int do_zip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	if (gzip((void *) dst, &dst_len, (void *) src, src_len) != 0)
 		return 1;
 
-	printf("Compressed size: %ld = 0x%lX\n", dst_len, dst_len);
+	printf("Compressed size: %lu = 0x%lX\n", dst_len, dst_len);
 	env_set_hex("filesize", dst_len);
 
 	return 0;
Signature · 1 line
2.20.1
#1 lore raw

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

Quoted 3 lines · Heinrich Schuchardt

dst_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/f7adbe54/attachment.sig>