aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src/mkzynfw.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-05-14 09:20:34 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-05-14 09:20:34 +0000
commit8976d8f2ad8e3419cdc88c83bf5e827d69849a51 (patch)
treec8f2f49cd8542fc604c1a8c4e316929613b4e8fa /tools/firmware-utils/src/mkzynfw.c
parent65dba323f79bfac2edb41724bcff03a3e9506ab8 (diff)
downloadupstream-8976d8f2ad8e3419cdc88c83bf5e827d69849a51.tar.gz
upstream-8976d8f2ad8e3419cdc88c83bf5e827d69849a51.tar.bz2
upstream-8976d8f2ad8e3419cdc88c83bf5e827d69849a51.zip
firmware-utils/mkzynfw: don't use next_offset twice (closes #7273)
The test if a file can fit in an image considers the current offset twice. So a image that would fit is too big. Thanks-to: Michael Kurz <michi.kurz@googlemail.com> SVN-Revision: 21445
Diffstat (limited to 'tools/firmware-utils/src/mkzynfw.c')
-rw-r--r--tools/firmware-utils/src/mkzynfw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/firmware-utils/src/mkzynfw.c b/tools/firmware-utils/src/mkzynfw.c
index 5c1bc24372..9018ea1084 100644
--- a/tools/firmware-utils/src/mkzynfw.c
+++ b/tools/firmware-utils/src/mkzynfw.c
@@ -983,7 +983,7 @@ calc_block_offsets(int type, uint32_t *offset)
next_offs = ALIGN(*offset, block->align);
avail = board->flash_size - board->romio_offs - next_offs;
- if (next_offs + block->file_size > avail) {
+ if (block->file_size > avail) {
ERR("file %s is too big, offset = %u, size=%u,"
" align = %u", block->file_name,
(unsigned)next_offs,