forked from auracaster/openocd
src/flash/nor/at91sam3|4l|7: fix clang static analyzer warnings
Change-Id: I5cd2b2ebb2bd1980bdd1632b5c35bda9718a1089 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/5365 Tested-by: jenkins Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
This commit is contained in:
@@ -601,6 +601,7 @@ static int sam4l_write(struct flash_bank *bank, const uint8_t *buffer,
|
||||
|
||||
/* There's at least one aligned page to write out. */
|
||||
if (count >= chip->page_size) {
|
||||
assert(chip->page_size > 0);
|
||||
int np = count / chip->page_size + ((count % chip->page_size) ? 1 : 0);
|
||||
|
||||
for (int i = 0; i < np; i++) {
|
||||
|
||||
Reference in New Issue
Block a user