1
0
mirror of https://github.com/armink/FlashDB.git synced 2025-01-16 20:12:52 +08:00

[kvdb] Improve get_next_kv_addr function. Fixed #45

This commit is contained in:
armink 2021-01-23 11:51:30 +08:00
parent 218c4df0bd
commit 9487749965

View File

@ -292,7 +292,7 @@ static uint32_t get_next_kv_addr(fdb_kvdb_t db, kv_sec_info_t sector, fdb_kv_t p
addr = pre_kv->addr.start + FDB_WG_ALIGN(1);
}
/* check and find next KV address */
addr = find_next_kv_addr(db, addr, sector->addr + db_sec_size(db) - SECTOR_HDR_DATA_SIZE);
addr = find_next_kv_addr(db, addr + SECTOR_HDR_DATA_SIZE, sector->addr + db_sec_size(db));
if (addr > sector->addr + db_sec_size(db) || pre_kv->len == 0) {
//TODO 扇区连续模式