mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2023-10-10 13:37:43 +02:00
flen was not defined yet, so move after assignment
This commit is contained in:
parent
0fa14cca02
commit
c522f28d68
@ -630,13 +630,14 @@ int flashwrite_pagemode(struct ddflash *ddf, int dev, uint32_t FlashOffset,
|
||||
uint8_t cmd[260];
|
||||
int i, j;
|
||||
uint32_t flen, blen;
|
||||
int blockerase = be && ((FlashOffset & 0xFFFF) == 0 ) && (flen >= 0x10000);
|
||||
int blockerase;
|
||||
|
||||
blen = flen = lseek(dev, 0, SEEK_END) - fw_off;
|
||||
if (blen % 0xff)
|
||||
blen = (blen + 0xff) & 0xffffff00;
|
||||
//printf("blen = %u, flen = %u\n", blen, flen);
|
||||
setbuf(stdout, NULL);
|
||||
blockerase = be && ((FlashOffset & 0xFFFF) == 0 ) && (flen >= 0x10000);
|
||||
|
||||
cmd[0] = 0x50; // EWSR
|
||||
err = flashio(ddf->fd, ddf->link, cmd, 1, NULL, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user