aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHamish Guthrie <hcg@openwrt.org>2007-05-30 10:49:46 +0000
committerHamish Guthrie <hcg@openwrt.org>2007-05-30 10:49:46 +0000
commit3e03b742690de6bc1da75dd05bcbce78be37e4e7 (patch)
tree1221d05387167ebbddf77ca7656e5acc8af663ab
parent748e71d47c11d2ec7ba7d404a131bbedfbf395ad (diff)
downloadupstream-3e03b742690de6bc1da75dd05bcbce78be37e4e7.tar.gz
upstream-3e03b742690de6bc1da75dd05bcbce78be37e4e7.tar.bz2
upstream-3e03b742690de6bc1da75dd05bcbce78be37e4e7.zip
Fixed trx - variable append used uninitialised. If -A option was not
used, the first offset was not written to the .trx file. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7400 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--tools/firmware-utils/src/trx.c5
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;
}