Fixed trx - variable append used uninitialised. If -A option was not
authorhcg <hcg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 30 May 2007 10:49:46 +0000 (10:49 +0000)
committerhcg <hcg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 30 May 2007 10:49:46 +0000 (10:49 +0000)
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

tools/firmware-utils/src/trx.c

index 1131238..f2ad991 100644 (file)
@@ -88,7 +88,7 @@ int main(int argc, char **argv)
        char *ofn = NULL;
        char *buf;
        char *e;
        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;
        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);
        }
 
        fclose(out);
-
+       
+       printf("Offsets:\n0x%08x\n0x%08x\n0x%08x\n", p->offsets[0], p->offsets[1], p->offsets[2]);
        return EXIT_SUCCESS;
 }
 
        return EXIT_SUCCESS;
 }
 
This page took 0.02349 seconds and 4 git commands to generate.