Skip to content

Commit

Permalink
lzmadec: Use the same type as the lzma call
Browse files Browse the repository at this point in the history
With sandbox on 32-bit the size_t type can be a little inconsistent. Use
the same type as the caller expects to avoid a compiler warning.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
  • Loading branch information
sjg20 authored and trini committed Jul 25, 2016
1 parent 5923c84 commit 1bb718c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/lzmadec.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
static int do_lzmadec(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
{
unsigned long src, dst;
unsigned long src_len = ~0UL, dst_len = ~0UL;
SizeT src_len = ~0UL, dst_len = ~0UL;
int ret;

switch (argc) {
Expand All @@ -40,7 +40,8 @@ static int do_lzmadec(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])

if (ret != SZ_OK)
return 1;
printf("Uncompressed size: %ld = 0x%lX\n", src_len, src_len);
printf("Uncompressed size: %ld = %#lX\n", (ulong)src_len,
(ulong)src_len);
setenv_hex("filesize", src_len);

return 0;
Expand Down

0 comments on commit 1bb718c

Please sign in to comment.