changeset 639:963d15a808eb

loadagent BINDUMP actually works
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 01 Mar 2020 18:28:10 +0000
parents 6562364b2033
children 5385aca4d813
files target-utils/loadagent/bindump.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/target-utils/loadagent/bindump.c	Sun Mar 01 18:14:56 2020 +0000
+++ b/target-utils/loadagent/bindump.c	Sun Mar 01 18:28:10 2020 +0000
@@ -22,8 +22,8 @@
 {
 	char *argv[3];
 	u_long start, length;
-	u_long addr, remlen, blklen;
-	int i;
+	u_long addr, remlen;
+	unsigned blklen, n;
 
 	if (parse_args(argbulk, 2, 2, argv, 0) < 0)
 		return;
@@ -48,7 +48,7 @@
 		serial_out(addr);
 		serial_out(blklen >> 8);
 		serial_out(blklen);
-		for (; blklen; blklen--) {
+		for (n = blklen; n; n--) {
 			serial_out(*(volatile u8 *)addr);
 			addr++;
 		}