aboutsummaryrefslogtreecommitdiff
path: root/common/cmd_ximg.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-02-24 17:33:22 +0000
committerSimon Glass <sjg@chromium.org>2013-02-28 19:09:23 -0800
commit41ef372c1a2d344621c74aa4bce5cdb0970ba5f1 (patch)
tree9abdeda0b3b87a70e4f3929e83ddd15f4704377f /common/cmd_ximg.c
parentbfc59966431e6335fd5be0589eec073902cc7bb3 (diff)
downloadu-boot-41ef372c1a2d344621c74aa4bce5cdb0970ba5f1.zip
u-boot-41ef372c1a2d344621c74aa4bce5cdb0970ba5f1.tar.gz
u-boot-41ef372c1a2d344621c74aa4bce5cdb0970ba5f1.tar.bz2
common: Use new numeric setenv functions
Use setenv_ulong(), setenv_hex() and setenv_addr() in common/ Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/cmd_ximg.c')
-rw-r--r--common/cmd_ximg.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/common/cmd_ximg.c b/common/cmd_ximg.c
index 42a7eba..ea0a26e 100644
--- a/common/cmd_ximg.c
+++ b/common/cmd_ximg.c
@@ -50,7 +50,6 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
ulong data, len, count;
int verify;
int part = 0;
- char pbuf[10];
image_header_t *hdr;
#if defined(CONFIG_FIT)
const char *uname = NULL;
@@ -256,10 +255,8 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
puts("OK\n");
}
- sprintf(pbuf, "%8lx", data);
- setenv("fileaddr", pbuf);
- sprintf(pbuf, "%8lx", len);
- setenv("filesize", pbuf);
+ setenv_hex("fileaddr", data);
+ setenv_hex("filesize", len);
return 0;
}