diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-06-17 10:04:34 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-06-21 12:33:33 +0200 |
commit | 58c7c027acc4ebf27ddd622001bafb596e8123cf (patch) | |
tree | 311129752324cecd955853de25f2f96034e48a96 /commands/loadb.c | |
parent | ecd082ad21a1d07973f42adbd5f2a20a07fdc71f (diff) | |
download | barebox-58c7c027acc4ebf27ddd622001bafb596e8123cf.tar.gz barebox-58c7c027acc4ebf27ddd622001bafb596e8123cf.tar.xz |
treewide: Use pr_setenv() where appropriate
We now have pr_setenv() which is a setenv() variant that takes a
format string. Use it where appropriate.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/loadb.c')
-rw-r--r-- | commands/loadb.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/commands/loadb.c b/commands/loadb.c index 17d3af84b5..7ab989f459 100644 --- a/commands/loadb.c +++ b/commands/loadb.c @@ -542,7 +542,6 @@ packet_error: static ulong load_serial_bin(void) { int size, i; - char buf[32]; /* Try to allocate the buffer we shall write to files */ write_buffer = malloc(MAX_WRITE_BUFFER); @@ -576,8 +575,7 @@ static ulong load_serial_bin(void) write_idx = 0; } printf("## Total Size = 0x%08x = %d Bytes\n", size, size); - sprintf(buf, "%X", size); - setenv("filesize", buf); + pr_setenv("filesize", "%X", size); err_quit: free(write_buffer); |