@@ -811,7 +811,6 @@ int NVStore::init()
811
811
uint32_t free_space_offset_of_area[NVSTORE_NUM_AREAS];
812
812
uint32_t init_attempts_val;
813
813
uint32_t next_offset;
814
- int os_ret;
815
814
int ret = NVSTORE_SUCCESS;
816
815
int valid;
817
816
uint16_t key;
@@ -869,8 +868,8 @@ int NVStore::init()
869
868
870
869
// Find start of empty space at the end of the area. This serves for both
871
870
// knowing whether the area is empty and for the record traversal at the end.
872
- os_ret = calc_empty_space (area, free_space_offset_of_area[area]);
873
- MBED_ASSERT (!os_ret );
871
+ ret = calc_empty_space (area, free_space_offset_of_area[area]);
872
+ MBED_ASSERT (!ret );
874
873
875
874
if (!free_space_offset_of_area[area]) {
876
875
area_state[area] = NVSTORE_AREA_STATE_EMPTY;
@@ -891,8 +890,8 @@ int NVStore::init()
891
890
892
891
// We have a non valid master record, in a non-empty area. Just erase the area.
893
892
if ((!valid) || (key != master_record_key)) {
894
- os_ret = flash_erase_area (area);
895
- MBED_ASSERT (!os_ret );
893
+ ret = flash_erase_area (area);
894
+ MBED_ASSERT (!ret );
896
895
area_state[area] = NVSTORE_AREA_STATE_EMPTY;
897
896
continue ;
898
897
}
@@ -939,8 +938,8 @@ int NVStore::init()
939
938
_active_area = 1 ;
940
939
}
941
940
_active_area_version = versions[_active_area];
942
- os_ret = flash_erase_area (1 - _active_area);
943
- MBED_ASSERT (!os_ret );
941
+ ret = flash_erase_area (1 - _active_area);
942
+ MBED_ASSERT (!ret );
944
943
}
945
944
946
945
// Traverse area until reaching the empty space at the end or until reaching a faulty record
0 commit comments