mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
nvs: use 'handle' argument name for consistency
This commit is contained in:
parent
f2af1c5305
commit
92ff04ebea
@ -710,7 +710,7 @@ esp_err_t nvs_entry_find(const char *part_name,
|
||||
* - ESP_ERR_INVALID_ARG if any of the parameters is NULL.
|
||||
* Note: don't release \c output_iterator in case ESP_ERR_INVALID_ARG has been returned
|
||||
*/
|
||||
esp_err_t nvs_entry_find_in_handle(nvs_handle_t c_handle, nvs_type_t type, nvs_iterator_t *output_iterator);
|
||||
esp_err_t nvs_entry_find_in_handle(nvs_handle_t handle, nvs_type_t type, nvs_iterator_t *output_iterator);
|
||||
|
||||
/**
|
||||
* @brief Advances the iterator to next item matching the iterator criteria.
|
||||
|
@ -786,7 +786,7 @@ extern "C" esp_err_t nvs_entry_find(const char *part_name, const char *namespace
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
extern "C" esp_err_t nvs_entry_find_in_handle(nvs_handle_t c_handle, nvs_type_t type, nvs_iterator_t *output_iterator)
|
||||
extern "C" esp_err_t nvs_entry_find_in_handle(nvs_handle_t handle, nvs_type_t type, nvs_iterator_t *output_iterator)
|
||||
{
|
||||
if (output_iterator == nullptr) {
|
||||
return ESP_ERR_INVALID_ARG;
|
||||
@ -800,22 +800,22 @@ extern "C" esp_err_t nvs_entry_find_in_handle(nvs_handle_t c_handle, nvs_type_t
|
||||
|
||||
Lock lock;
|
||||
nvs::Storage *pStorage;
|
||||
NVSHandleSimple *handle;
|
||||
NVSHandleSimple *handle_obj;
|
||||
|
||||
auto err = nvs_find_ns_handle(c_handle, &handle);
|
||||
auto err = nvs_find_ns_handle(handle, &handle_obj);
|
||||
if (err != ESP_OK) {
|
||||
*output_iterator = nullptr;
|
||||
return err;
|
||||
}
|
||||
|
||||
pStorage = handle->get_storage();
|
||||
pStorage = handle_obj->get_storage();
|
||||
nvs_iterator_t it = create_iterator(pStorage, type);
|
||||
if (it == nullptr) {
|
||||
*output_iterator = nullptr;
|
||||
return ESP_ERR_NO_MEM;
|
||||
}
|
||||
|
||||
bool entryFound = handle->findEntryNs(it);
|
||||
bool entryFound = handle_obj->findEntryNs(it);
|
||||
if (!entryFound) {
|
||||
free(it);
|
||||
*output_iterator = nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user