changeset 543:947c6a443a9c

dspdump: bugfix in bigdump command
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 28 Oct 2019 20:47:40 +0000
parents b95b251b33eb
children 451d8b545b11
files target-utils/dspdump/dumpops.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/target-utils/dspdump/dumpops.c	Mon Oct 28 20:42:06 2019 +0000
+++ b/target-utils/dspdump/dumpops.c	Mon Oct 28 20:47:40 2019 +0000
@@ -43,7 +43,7 @@
 	u16 mode;
 	u32 addr, len;
 {
-	u32 chunk, remain;
+	u32 chunk, remain, n;
 	volatile u16 *api;
 	int rc;
 
@@ -57,7 +57,7 @@
 			return(rc);
 		}
 		api = (volatile u16 *) APIF_ADDR;
-		for (; chunk; chunk--) {
+		for (n = chunk; n; n--) {
 			if (!(addr & 0xF))
 				printf("%05x : ", addr);
 			printf("%04x%c", *api++, ((addr&15)==15)?'\n':' ');