From 7b7265b5429f3e8fe0cb0a2f0ad1fcf7fd7c28de Mon Sep 17 00:00:00 2001 From: stefanrueger Date: Sun, 16 Aug 2026 07:01:34 +0200 Subject: [PATCH] Use mnemonic variable name --- src/jtag3.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/jtag3.c b/src/jtag3.c index 5f3385f6..5a01732e 100644 --- a/src/jtag3.c +++ b/src/jtag3.c @@ -2039,7 +2039,7 @@ static int jtag3_paged_write(const PROGRAMMER *pgm, const AVRPART *p, const AVRM static int jtag3_paged_load(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM *m, unsigned int page_size, unsigned int addr, unsigned int n_bytes) { - unsigned int block_size; + unsigned int block_size = 0; unsigned int maxaddr = addr + n_bytes; unsigned char cmd[12]; unsigned char *resp = NULL; @@ -2048,10 +2048,9 @@ static int jtag3_paged_load(const PROGRAMMER *pgm, const AVRPART *p, const AVRME pmsg_notice2("jtag3_paged_load(.., %s, %d, 0x%04x, %d)\n", m->desc, page_size, addr, n_bytes); - block_size = jtag3_memaddr(pgm, p, m, addr); - if(block_size != addr) - imsg_notice2("mapped to address: 0x%04x\n", block_size); - block_size = 0; + unsigned int memaddr = jtag3_memaddr(pgm, p, m, addr); + if(memaddr != addr) + imsg_notice2("mapped to address: 0x%04x\n", memaddr); if(!(pgm->flag & PGM_FL_IS_DW) && jtag3_program_enable(pgm) < 0) return -1;