summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2019-01-03 11:55:38 -0800
committerKeith Packard <keithp@keithp.com>2019-01-03 12:10:12 -0800
commit96be286b3a9daa9bdb7872118be0118872d483f8 (patch)
tree1f6b69b2411555492856de96638b4ebbd550ff10
parent6f729ff46b2f4531db68f0af85e7e9fe0f6d1969 (diff)
ao-tools/ao-load: Return status from 'rewrite'
Was just falling off the end of this function, returning a random value. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--ao-tools/ao-load/ao-load.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ao-tools/ao-load/ao-load.c b/ao-tools/ao-load/ao-load.c
index 0cf03772..a2de42bc 100644
--- a/ao-tools/ao-load/ao-load.c
+++ b/ao-tools/ao-load/ao-load.c
@@ -93,6 +93,7 @@ rewrite(struct ao_hex_image *image, unsigned addr, char *data, int len)
printf (" %02x", data[i]);
printf("\n");
memcpy(image->data + addr - image->address, data, len);
+ return 1;
}
static const struct option options[] = {
@@ -112,8 +113,6 @@ int
main (int argc, char **argv)
{
struct ccdbg *dbg;
- uint8_t status;
- uint16_t pc;
struct ao_hex_file *hex;
struct ao_hex_image *image;
char *filename;