mirror of
https://github.com/armink/FlashDB.git
synced 2025-01-16 20:12:52 +08:00
adding ifdef guards to update method. should only be called if cache is used.
This commit is contained in:
parent
7062902a3e
commit
0b5ac0039b
@ -1482,8 +1482,10 @@ static bool check_and_recovery_kv_cb(fdb_kv_t kv, void *arg1, void *arg2)
|
||||
_fdb_write_status((fdb_db_t)db, kv->addr.start, status_table, FDB_KV_STATUS_NUM, FDB_KV_ERR_HDR, true);
|
||||
return true;
|
||||
} else if (kv->crc_is_ok && kv->status == FDB_KV_WRITE) {
|
||||
/* update the cache when first load */
|
||||
#ifdef FDB_KV_USING_CACHE
|
||||
/* update the cache when first load. If caching is disabled, this step is not performed */
|
||||
update_kv_cache(db, kv->name, kv->name_len, kv->addr.start);
|
||||
#endif
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user