subsys: storage: flash_map: Fix Coverity issues
Loop counter was type of signed int while it was compared to unsigned lvalue in loop condition. Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This commit is contained in:
parent
6db7b43daf
commit
51527e07ef
1 changed files with 2 additions and 2 deletions
|
@ -79,7 +79,7 @@ void flash_area_close(const struct flash_area *fa)
|
|||
|
||||
static struct device *get_flash_dev_from_id(u8_t id)
|
||||
{
|
||||
for (int i = 0; i < ARRAY_SIZE(flash_drivers_map); i++) {
|
||||
for (unsigned int i = 0; i < ARRAY_SIZE(flash_drivers_map); i++) {
|
||||
if (flash_drivers_map[i].id == id) {
|
||||
return flash_dev[i];
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ u8_t flash_area_align(const struct flash_area *fa)
|
|||
|
||||
static int flash_map_init(struct device *dev)
|
||||
{
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(flash_dev); i++) {
|
||||
flash_dev[i] = device_get_binding(flash_drivers_map[i].name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue