diff options
author | Oliver McFadden <z3ro.geek@gmail.com> | 2007-10-11 02:07:07 +0000 |
---|---|---|
committer | Oliver McFadden <z3ro.geek@gmail.com> | 2007-10-11 02:37:44 +0000 |
commit | 2bb28df62516fb95b3fe9a416499b44591790dfb (patch) | |
tree | 1052f4c561ba510135ab188312392b35c29882b0 | |
parent | 64ddd21f218c2d1a80f3ce5f57e1fde266c19a8f (diff) |
Cleaned up the packet dumping code slightly.
-rw-r--r-- | src/revenge_dump.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/revenge_dump.c b/src/revenge_dump.c index 3c16843..b046fd4 100644 --- a/src/revenge_dump.c +++ b/src/revenge_dump.c @@ -92,7 +92,6 @@ dump_packet0 (unsigned int packet_type, unsigned int packet_cnt, { int i; unsigned int reg; - unsigned int proc; if (option_debug) { @@ -100,16 +99,14 @@ dump_packet0 (unsigned int packet_type, unsigned int packet_cnt, packet_type, packet_cnt, packet_bit15, packet_reg); } - proc = packet_cnt + 1; - - for (i = 0; i < proc; i++) + for (i = 0; i < packet_cnt + 1; i++) { fprintf (file, "%08x\n", mem_map[i]); reg = packet_bit15 ? packet_reg : packet_reg + (i << 2); dump_reg (reg, mem_map[i]); } - return proc; + return packet_cnt + 1; } static int @@ -131,7 +128,6 @@ dump_packet3 (unsigned int packet_type, unsigned int packet_cnt, unsigned int packet_opcode, unsigned int *mem_map, FILE * file) { int i; - unsigned int proc; if (option_debug) { @@ -139,9 +135,7 @@ dump_packet3 (unsigned int packet_type, unsigned int packet_cnt, packet_type, packet_cnt, packet_opcode); } - proc = packet_cnt + 1; - - for (i = 0; i < proc; i++) + for (i = 0; i < packet_cnt + 1; i++) { fprintf (file, "%08x\n", mem_map[i]); if (option_debug) @@ -150,7 +144,7 @@ dump_packet3 (unsigned int packet_type, unsigned int packet_cnt, } } - return proc; + return packet_cnt + 1; } static void |