Skip to content

Commit

Permalink
Astyle fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Seppo Takalo committed Nov 21, 2019
1 parent c1661d6 commit d855e90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -705,7 +705,7 @@ void test_write_deinit_init()

for (int i = 0; i < 10; i++) {
// Generate test pattern
for(int j = 0; j < size; j++) {
for (int j = 0; j < size; j++) {
prog[j] = (uint8_t)'0' + i + j;
}

Expand Down
6 changes: 3 additions & 3 deletions features/storage/kvstore/tdbstore/TDBStore.cpp
Expand Up @@ -161,7 +161,7 @@ int TDBStore::erase_erase_unit(uint8_t area, uint32_t offset)
// because we use BufferedBlockDevice that has page buffers
uint8_t val = 0xff;
int ret;
for (;eu_size; --eu_size) {
for (; eu_size; --eu_size) {
ret = _buff_bd->program(&val, bd_offset++, 1);
if (ret) {
return ret;
Expand Down Expand Up @@ -649,7 +649,7 @@ int TDBStore::set_finalize(set_handle_t handle)
// we should erase one sector more, just to ensure that in case of power failure
// next init() would not extend the scan phase to that section as well.
os_ret = read_record(_active_area, _free_space_offset, 0, 0, 0, actual_data_size, 0,
false, false, false, false, hash, flags, next_offset);
false, false, false, false, hash, flags, next_offset);
if (os_ret == MBED_SUCCESS) {
check_erase_before_write(_active_area, _free_space_offset, sizeof(record_header_t));
}
Expand Down Expand Up @@ -949,7 +949,7 @@ int TDBStore::increment_max_keys(void **ram_table)
// Reallocate ram table with new size
ram_table_entry_t *old_ram_table = (ram_table_entry_t *) _ram_table;
ram_table_entry_t *new_ram_table = new ram_table_entry_t[_max_keys + 1];
memset(new_ram_table, 0, sizeof(ram_table_entry_t)*(_max_keys + 1));
memset(new_ram_table, 0, sizeof(ram_table_entry_t) * (_max_keys + 1));

// Copy old content to new table
memcpy(new_ram_table, old_ram_table, sizeof(ram_table_entry_t) * _max_keys);
Expand Down

0 comments on commit d855e90

Please sign in to comment.