mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
fix(openthread): fix openthread settings get next empty index
This commit is contained in:
@@ -39,6 +39,7 @@ static esp_err_t get_next_empty_index(uint16_t aKey, uint8_t *index)
|
|||||||
|
|
||||||
for (uint8_t i = 0; i != UINT8_MAX; i++) {
|
for (uint8_t i = 0; i != UINT8_MAX; i++) {
|
||||||
s_unused_pos++;
|
s_unused_pos++;
|
||||||
|
found = false;
|
||||||
snprintf(ot_nvs_key, sizeof(ot_nvs_key), OT_KEY_INDEX_PATTERN, (uint8_t)aKey, s_unused_pos);
|
snprintf(ot_nvs_key, sizeof(ot_nvs_key), OT_KEY_INDEX_PATTERN, (uint8_t)aKey, s_unused_pos);
|
||||||
ret = nvs_entry_find(OT_PART_NAME, OT_NAMESPACE, NVS_TYPE_BLOB, &nvs_it);
|
ret = nvs_entry_find(OT_PART_NAME, OT_NAMESPACE, NVS_TYPE_BLOB, &nvs_it);
|
||||||
while (ret == ESP_OK) {
|
while (ret == ESP_OK) {
|
||||||
|
Reference in New Issue
Block a user