Skip to content

Commit 85dc408

Browse files
committed
address review comments
1 parent 0367ba7 commit 85dc408

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

ports/nrf/common-hal/_bleio/bonding.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ void bonding_erase_storage(void) {
9292
// Given NULL to start or block address, return the address of the next valid block.
9393
// The last block returned is the unused block at the end.
9494
// Return NULL if we have run off the end of the bonding space.
95+
9596
STATIC bonding_block_t *next_block(bonding_block_t *block) {
9697
while (1) {
9798
// Advance to next block.
@@ -127,10 +128,6 @@ STATIC bonding_block_t *find_existing_block(bool is_central, bonding_block_type_
127128
if (block == NULL) {
128129
return NULL;
129130
}
130-
if (block->type == BLOCK_INVALID) {
131-
// Skip discarded blocks.
132-
continue;
133-
}
134131
// If types match, and block is unused, just return it.
135132
// Otherwise check that is_central and ediv match.
136133
if (type == block->type) {

ports/nrf/peripherals/nrf/nvm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ bool sd_flash_write_sync(uint32_t *dest_words, uint32_t* src_words, uint32_t num
8989
// location before an erase is necessary, even if the write is all
9090
// ones (erased state). So we can't avoid erases even if the page
9191
// appears to be already erased (all ones), unless we keep track of
92-
// writes to a page.g
92+
// writes to a page.
9393

9494
bool nrf_nvm_safe_flash_page_write(uint32_t page_addr, uint8_t *data) {
9595
#ifdef BLUETOOTH_SD

0 commit comments

Comments
 (0)