diff options
author | Hamish Guthrie <hcg@openwrt.org> | 2007-05-30 10:49:46 +0000 |
---|---|---|
committer | Hamish Guthrie <hcg@openwrt.org> | 2007-05-30 10:49:46 +0000 |
commit | fe57573343120b83235ccd86cd37458165bbc75e (patch) | |
tree | 1ec657caee8d4d133ddc39067ad897d95ccca482 /tools/firmware-utils/src | |
parent | a03b9ae8ad1e3e22129a469d7f8940da3af18c67 (diff) | |
download | upstream-fe57573343120b83235ccd86cd37458165bbc75e.tar.gz upstream-fe57573343120b83235ccd86cd37458165bbc75e.tar.bz2 upstream-fe57573343120b83235ccd86cd37458165bbc75e.zip |
Fixed trx - variable append used uninitialised. If -A option was not used, the first offset was not written to the .trx file.
SVN-Revision: 7400
Diffstat (limited to 'tools/firmware-utils/src')
-rw-r--r-- | tools/firmware-utils/src/trx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/firmware-utils/src/trx.c b/tools/firmware-utils/src/trx.c index 1131238a4e..f2ad991367 100644 --- a/tools/firmware-utils/src/trx.c +++ b/tools/firmware-utils/src/trx.c @@ -88,7 +88,7 @@ int main(int argc, char **argv) char *ofn = NULL; char *buf; char *e; - int c, i, append; + int c, i, append = 0; size_t n; uint32_t cur_len; unsigned long maxlen = TRX_MAX_LEN; @@ -230,7 +230,8 @@ int main(int argc, char **argv) } fclose(out); - + + printf("Offsets:\n0x%08x\n0x%08x\n0x%08x\n", p->offsets[0], p->offsets[1], p->offsets[2]); return EXIT_SUCCESS; } |