Fix assert to check flash programming offset
The assert introduced in 00c8648351
checks
whether the programming offset equals to page_size of the flash, while it
wants to check whether the offset is a multiple of the page_size.
Change-Id: I794d021951a28c1cc520b5eea5d500f097721b06
Signed-off-by: Attila Kinali <attila@kinali.ch>
Reviewed-on: http://openocd.zylin.com/482
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
__archive__
parent
14f51c0a32
commit
cea4842207
|
@ -2845,7 +2845,7 @@ static int sam3_write(struct flash_bank *bank,
|
|||
|
||||
/* By checking that offset is correct here, we also
|
||||
fix a clang warning */
|
||||
assert(offset == pPrivate->page_size);
|
||||
assert(offset % pPrivate->page_size == 0);
|
||||
|
||||
/* intermediate large pages */
|
||||
/* also - the final *terminal* */
|
||||
|
|
Loading…
Reference in New Issue